我有一个漂亮的标准VPS运行Ubuntu 8.1,Apache 2.2,PHP 5等 – 标准灯栈。 我正在使用suhosin,并且尽我所能来插入显而易见的东西,因为我是唯一的用户 – 除了通过非标准端口上的pubkey,没有SSH访问权限,SSH没有root访问权限,没有运行FTP服务器, iptables设置为放弃基本上端口80或我的SSH端口(没有邮件服务器或其他任何东西)之外的任何东西。
但是,我仍然受到了攻击(尽pipe我可以告诉),可能是通过SQL注入来实现的。 我已经locking了SQL用户(根目录之外只有一个,而且他的权限有限,没有文件等)
所以我跑nikto看看我做错了什么,还有一个我从来没有见过的东西的列表,找不到使用“找”或任何其他方法,我知道。 见下文:
+ /autologon.html?10514: Remotely Anywhere 5.10.415 is vulnerable to XSS attacks that can lead to cookie theft or privilege escalation. This is typically found on port 2000.
+ /servlet/webacc?User.html=noexist: Netware web access may reveal full path of the web server. Apply vendor patch or upgrade.
+ OSVDB-35878: /modules.php?name=Members_List&letter='%20OR%20pass%20LIKE%20'a%25'/*: PHP Nuke module allows user names and passwords to be viewed.
+ OSVDB-3092: /sitemap.xml: This gives a nice listing of the site content.
+ OSVDB-12184: /index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000: PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings.
+ OSVDB-12184: /some.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42: PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings.
+ OSVDB-12184: /some.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42: PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings.
+ OSVDB-12184: /some.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42: PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings.
+ OSVDB-3092: /administrator/: This might be interesting...
+ OSVDB-3092: /Agent/: This might be interesting...
+ OSVDB-3092: /includes/: This might be interesting...
+ OSVDB-3092: /logs/: This might be interesting...
+ OSVDB-3092: /tmp/: This might be interesting...
+ ERROR: /servlet/Counter returned an error: error reading HTTP response
+ OSVDB-3268: /icons/: Directory indexing is enabled: /icons
+ OSVDB-3268: /images/: Directory indexing is enabled: /images
+ OSVDB-3299: /forumscalendar.php?calbirthdays=1&action=getday&day=2001-8-15&comma=%22;echo%20'';%20echo%20%60id%20%60;die();echo%22: Vbulletin allows remote command execution. See link
+ OSVDB-3299: /forumzcalendar.php?calbirthdays=1&action=getday&day=2001-8-15&comma=%22;echo%20'';%20echo%20%60id%20%60;die();echo%22: Vbulletin allows remote command execution. See link
+ OSVDB-3299: /htforumcalendar.php?calbirthdays=1&action=getday&day=2001-8-15&comma=%22;echo%20'';%20echo%20%60id%20%60;die();echo%22: Vbulletin allows remote command execution. See link
+ OSVDB-3299: /vbcalendar.php?calbirthdays=1&action=getday&day=2001-8-15&comma=%22;echo%20'';%20echo%20%60id%20%60;die();echo%22: Vbulletin allows remote command execution. See link
+ OSVDB-3299: /vbulletincalendar.php?calbirthdays=1&action=getday&day=2001-8-15&comma=%22;echo%20'';%20echo%20%60id%20%60;die();echo%22: Vbulletin allows remote command execution. See link
+ OSVDB-6659: /kCKAowoWuZkKCUPH7Mr675ILd9hFg1lnyc1tWUuEbkYkFCpCdEnCKkkd9L0bY34tIf9l6t2owkUp9nI5PIDmQzMokDbp71QFTZGxdnZhTUIzxVrQhVgwmPYsMK7g34DURzeiy3nyd4ezX5NtUozTGqMkxDrLheQmx4dDYlRx0vKaX41JX40GEMf21TKWxHAZSUxjgXUnIlKav58GZQ5LNAwSAn13l0w<font%20size=50>DEFACED<!--//--: MyWebServer 1.0.2 is vulnerable to HTML injection. Upgrade to a later version.
我了解跟踪和索引,但是vbulletin和autologin呢? 我search了,我找不到像服务器上的任何文件。 我不知道“MyWebServer”的东西,PHP的Nuke,或Netware / servlet的东西 – 除了一个非常标准的Joomla网站(更新到最新版本)之外,服务器上没有任何东西。
任何帮助这些消息和/或我做错了什么非常赞赏。
尼科产生了很多误报。 您发布的大部分结果可能是也可能不是问题,需要人工检查。
Nikto这样的警告是因为你已经启用了目录列表。
OSVDB-3092: /logs/: This might be interesting...
这被认为是一个次要的信息泄漏漏洞。 要修补这个漏洞,你可以修改你的apacheconfiguration:
Options -Indexes
另一个补丁是将空白的index.html页面放在这些文件夹中。
Nikto也在说,你可能正在运行PHP-Nuke和Vbulletin。 在这些应用程序中已经发现了漏洞,你也许是脆弱的。 如果您正在运行这些应用程序,请确保它们已完全更新。
以下是您应该做的其他事情:
1)我强烈build议安装mod_security ,默认的规则集很好的防止利用。
2)确保你的PHP Web应用程序有自己的限制MySQL用户帐户。 确保file_priv已被撤销此帐户。 MySQL文件权限是您可以给Web应用程序最糟糕的事情之一。 您还应该确保它只能访问需要工作的数据库。 例如,将用户帐户访问权限授予mysql.user将是一个错误。
3)运行PHPSecInfo并相应地修改你的php.ini文件。 你不应该有任何RED错误。
4)运行Nessus的更自由版本的OpenVAS。 OpenVAS将运行Nikto以及其他一系列testing。