Archive

Archive for the ‘wordpress支持’ Category

升级到 WordPress 2.8.6

November 13th, 2009

从 WordPress 官方开发日志了解到,这次主要修复两个安全问题:

2.8.6 fixes two security problems that can be exploited by registered, logged in users who have posting privileges.

其中一个漏洞为“Press This”的XSS弱点攻击,另一个为在特定Apache配置环境下上传的文件名可能被利用,导致php代码在上传目录执行(翻译的不知道有没有问题,感觉怪怪的!)!

还是看下原文吧:

The first problem is an XSS vulnerability in Press This discovered by Benjamin Flesch. The second problem, discovered by Dawid Golunski, is an issue with sanitizing uploaded file names that can be exploited in certain Apache configurations.

官方建议:若你对博客下注册的用户(作者)不是很信任,那么就更新到 2.8.6 。

这次打包的日期是20091113日,修改的文件列表为:

│ readme.html

├─wp-admin
│ press-this.php

├─wp-content
│ └─plugins
│ └─akismet
│ akismet.php
│ readme.txt

└─wp-includes
│ formatting.php
│ functions.php
│ version.php

└─js
└─swfupload
└─plugins
swfupload.speed.js

最新的文件修改日期为20091112,打包日期为20091113。

16日更新:
WordPress 2.8.5 任意文件上传漏洞,导致php代码可能被执行

比如
test-image.php.jpg

包含以下代码

<?php
phpinfo();
?>

上传之后,访问“图片”文件链接,可看到 php info 的执行结果。

间接的防御办法可在上传目录下(wordpress/wp-content/uploads)建一个 .htaccess 文件,内容如下:

deny from all
<Files ~ "^\w+\.(gif|jpe?g|png|avi)$">
order deny,allow
allow from all
</Files>

参考:http://clin003.com/wp-use/learning-wordpress-security-whitepaper-1438/

.php.jpg 这样的扩展名中的php代码可能被执行和apache支持多扩展名的有一定关系,下面引用一段 Apache docs 中的介绍:

Files can have more than one extension, and the order of the extensions is normally irrelevant.
For example, if the file welcome.html.fr maps onto content type text/html and language French then
the file welcome.fr.html will map onto exactly the same information. If more than one extension is
given that maps onto the same type of meta-information, then the one to the right will be used,
except for languages and content encodings. For example, if .gif maps to the MIME-type image/gif
and .html maps to the MIME-type text/html, then the file welcome.gif.html will be associated with
the MIME-type text/html.

Care should be taken when a file with multiple extensions gets associated with both a MIME-type
and a handler. This will usually result in the request being handled by the module associated with
the handler. For example, if the .imap extension is mapped to the handler imap-file
(from mod_imagemap) and the .html extension is mapped to the MIME-type text/html, then the file
world.imap.html will be associated with both the imap-file handler and text/html MIME-type.
When it is processed, the imap-file handler will be used, and so it will be treated as a
mod_imagemap imagemap file.

参考:http://httpd.apache.org/docs/2.2/mod/mod_mime.html#multipleext

wordpress支持 , ,

升级到 WordPress 2.8.5

October 22nd, 2009

关于WordPress 2.8.5,官方的升级介绍

* A fix for the Trackback Denial-of-Service attack that is currently being seen.
* Removal of areas within the code where php code in variables was evaluated.
* Switched the file upload functionality to be whitelisted for all users including Admins.
* Retiring of the two importers of Tag data from old plugins.

以下为WP群内“午夜”提供的翻译:

修复了当前存在的一个引用的拒绝服务攻击;
清除代码中可评估变量中的PHP代码;
转换文件上传功能中,所有用户包括管理员为白名单;
除去来自过期的插件的标签数据的两个入口。

这次打包的日期是20091020 ,修改的文件列表为:

│ readme.html
│ wp-app.php
│ wp-trackback.php
│ xmlrpc.php

├─wp-admin
│ │ edit-attachment-rows.php
│ │ install.php
│ │ page.php
│ │ post.php
│ │
│ ├─import
│ │ wordpress.php
│ │
│ └─includes
│ post.php
│ update-core.php

├─wp-content
│ └─plugins
│ └─akismet
│ akismet.php
│ readme.txt

└─wp-includes
author-template.php
bookmark-template.php
capabilities.php
category-template.php
classes.php
comment-template.php
formatting.php
general-template.php
media.php
post-template.php
rewrite.php
theme.php
version.php

通过简单的对比文件修改日期来制作补丁包,方便不能自动升级的童鞋。。

wordpress支持

WordPress < 2.8.1 Security Bypass 0day

July 23rd, 2009

发布时间:2009-07-22
测试方法:

本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!
Wordpress < 2.8.1 All Version suffer from admin module configuration security bypass exploit , attackers use these urls to attack the blog.

http://xxx.com/wp-admin/admin.php?page=/collapsing-archives/options.txt

http://xxx.com/wp-admin/admin.php?page=akismet/readme.txt

http://xxx.com/wp-admin/admin.php?page=related-ways-to-take-action/options.php

http://xxx.com/wp-admin/admin.php?page=wp-security-scan/securityscan.php

It is harmful.Please update your blog as soon as you can.

// sebug.net [2009-07-22]

wordpress支持, 漏洞

WordPress 2.8.2发布,修复评论XSS隐患

July 20th, 2009

刚刚看到WordPress 2.8.2的更新提示,查看开发者博客得知,在这一版本中修复啦个XSS弱安全隐患(没有对评论者的URL连接进行全面的过滤,导致后台管理员登录可能被转向到恶意网站!)。

详情查看官方说明

WordPress 2.8.2 fixes an XSS vulnerability. Comment author URLs were not fully sanitized when displayed in the admin. This could be exploited to redirect you away from the admin to another site. Download 2.8.2 or automatically upgrade from the Tools->Upgrade page of your blog’s admin.

wordpress 2.8.1漏洞描述:

wordpress\wp-admin\includes\template.php

文件中的$author_url没有对单引号做过滤,最后又使用拼接href=’$author_url’。

导致我们可以添加一个这个href的事件函数进去。

PHP代码

1.
2. 2085:$author_url = get_comment_author_url();
3.
4.
5.
6. 2182:case ‘author’:
7.
8.   echo “<td $attributes><strong>”; comment_author(); echo ‘</strong><br />’;
9.
10.      if ( !emptyempty($author_url) )
11.
12.          echo “<a title=’$author_url’ href=’$author_url’>$author_url_display</a><br />”;

前台的评论展示,也存在这个漏洞。

(白菜林注:前台评论展示没有发现可以直接跳转。。)

漏洞描述参考:wordpress281评论显示xss漏洞

附注:

根据演示链接生成PHP代码:

http://blog.sohu.com/fh8e3333211134333/f8e9wjfidsj3332dfs’  onmousemove=’location.href=String.fromCharCode(<?php $url=”http://clin003.com/”;echo ‘<script type=”text/javascript”>var url =”‘.$url.’”;’;for($i=0;$i<strlen($url);$i++){echo ‘document.write(url.charCodeAt(‘ .$i. ‘));document.write(“,”);’;}echo “</script>”;?>);’

wordpress支持

今日杂碎:广告

June 28th, 2009

杂碎1:在洛阳生活论坛里的几个板块添加了相关服务产品广告

没有申请到百度联盟的主题广告,都是新业务里的广告。

游戏板块添加了游戏主题广告,贴图娱乐板块添加了影音软件下载主题广告,数码板块添加了杀毒软件和安全服务主题广告。

杂碎2:另外在洛阳生活网聚合的单页面左侧添加啦336×280的Adsense广告

广告右侧留12px的宽度然后是文章内容。

杂碎3:在百科发的链接都替换为跳转链接,然后在跳转链接页面添加啦广告(目前看来有针对性的广告还是不错的)

因为前些天他们发电视剧信息,百科词条流量涨啦一把,于是趁机替换超链接到跳转页面,广告加上一天,目前看来效果不错

截个图来
跳转链接页面添广告

杂碎4:查看页面执行时间代码

群里“代言人”提供的:

<?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?>

前面是查询次数,后面是时间,单位是秒

(PS:以上代码只在Wordpress中测试过)

参考:http://www.fuwa88.com/blog/2009-06-25/13:12:01.32

wordpress支持, 今日一点 , ,

WordPress2.8对页面头部的更新

June 23rd, 2009

上午的时候,看页面关键字是多少,发现多啦些东东(这个只是看的本博客的源码,其实是在另一个博客看得)这个:

<link rel=‘index’ title=‘Lin&#039;s空间|Only’ href=‘http://clin003.com’ />
<link rel=’start’ title=‘Hello world!’ href=‘http://clin003.com/about/hello-world-1/’ />
<link rel=‘prev’ title=‘对HDWiki网站进行FLASH恶意代码加载与修复办法[HDWiki跨站漏洞]‘ href=‘http://clin003.com/wiki/hdwiki-flash-xss-1736/’ />

开始还以为是”all in one seo”这个插件升级后弄的,为了验证下想法,把这个插件停用,再看,还有!因为博客里没有别的搜索引擎优化插件啦,于是对比下本地的wordpress2.7的博客,看post页面源码,没有这三个标签。看另外两个wp2.8的博客也都有这三个标签。

这个更新并没有在wp2.8的更新说明里看到(我还没去看官方的更新记录,只是在升级博客前看别人写的更新说明!)

大致去查啦下这个标签说明:

link 标签 — 当在文档中声明使用外接资源(比如CSS)时使用此标签
+ link标签是单独出现的
+ 属性
# href — 指定需要加载的资源(CSS文件)的地址URI
# media — 媒体类型,参见CSS教程
# rel — 指定链接类型
# rev — 指定链接类型
# type — 包含内容的类型,一般使用type=”text/css”

Start — 通知搜索引擎,文档的开始
next — 记录文档的下一页.(浏览器可以提前加载此页)
Prev — 记录文档的上一页.(定义浏览器的后退键)

start next prev 属性值 — start next prev,全部属于LinkTypes,此值通常可以提示浏览器文章的开始,下一篇,上一篇的url

此属性值通常在,rel,rev属性中出现
Contents
Index — 当前文档的索引
Glossary — 词汇
Copyright — 当前文档的版权
Chapter — 当前文档的章节
Section — 作为文档的一部分
Subsection — 作为文档的一小部分
Appendix — 定义文档的附加信息
Help — 链接帮助信息
Bookmark — 书签

rel与rev属性相同,它们都是属于LinkTypes属性.

注意:ie浏览器对此类型的支持非常不好,推荐使用Firefox

看来这样既方便搜索引擎也方便浏览器提前加载页面啊(PS:是不是说有一页的流量要被火狐类的浏览器浪费掉啦呢,囧)。

参考文档:rel 属性 link标签中的rel属性,定义了文档与链接的关系

wordpress支持, 今日一点 , ,