注册 | 登录 | 归档 | 搜索 | 标签 | 评论 | 链接 | 滚动板 | 在线工具
浏览模式: 标准 | 列表 Tag: php

转码引发的扯淡

php在进行utf8编码转换时比较严格,对于提交不合法的数据将丢掉或不解析,而第三方编码类在这里会进行强行转换。这就是这两天转码引发了一连串的东东。

sablog 1.6注射漏洞 http://www.sebug.net/vulndb/3784/
Discuz!论坛wap功能模块编码的注射漏洞 http://www.sebug.net/vulndb/3778/
PHPWind Forums编码注射漏洞 http://www.sebug.net/vulndb/3785/

下了几套开源的系统看看了,还有部分系统也同意存在这样的问题。比较龌龊的东东。建议采用第三方编码转换类的朋友检查一下。

Tags: 转码, 注入, 漏洞, php

取WEB版本的一段脚本

$fp =@fsockopen($domain$port$errno$errstr20);
     if(!
$fp){
             return 
"UNKNOWN";
    exit;
    } else {
         
$ok false;
         @
fputs($fp,"GET $geturl HTTP/1.0\nHost: $domain\n\n\r\n");
         while(!
feof($fp)){
             
$line fgets($fp,128);
             if(! 
$ok && preg_match("/^[\r\n]+$/",$line)) {
              
$ok true//正文开始
             
}
             if(!
$ok){
                 if(
preg_match("/([^:]+?):(.+)/",$line,$r))
                 
$info[$r[1]] = $r[2];//取WEB版本
                 
}else{
         
$body.=$line;//取得BODY文件
                 
}
    }
         }


     
fclose($fp);

Tags: php, 版本, 脚本, webserver

php空字节的一个tips

晚上给SEbug装个论坛,整了半天源码总是直接显示出来了,找了半天发现有个文件里存在非法字符。

和 Helvin 测试了下,发现在php中插入0x00可以让php不解析,过滤不严的话,就可以直接让他显示源代码。非程序错误跳出,是解释器没有执行。可能在PHP看来只是一个正常的错误,他认为请求了错误内存地址。

未命名.jpg

大小: 3.64 K
尺寸: 230 x 102
浏览: 16 次
点击打开新窗口浏览全图

在网上找了一下php关于Null Byte Character的漏洞真不少。测试一下,发现GET是没有影响的,那就没价值了。php处理字串的代码好几M呢,懒得去看也不一定能看得明白。有兴趣的朋友可以跟一下。

Tags: php, 空字节, tips, 原创, bug

SaGunman

程序介绍

SaGunman是一个采用php和MySQL构建的聚合自动采集系统.作为Sablog-X同品牌产品,SaGunman在代码质量,运行效率,负载能力,安全等级,功能可操控性和权限严密性等方面都得以保障.

http://www.sagunman.com/

应用案例

http://www.lzbest.net

 http://www.4sec.org

Tags: sagunman, rss, php

超级诡异的MySQL server has gone away解决办法

mysql执行show status,通常更关注缓存效果、进程数等,往往忽略了两个值:

Variable_name Value
Aborted_clients 3792
Aborted_connects 376

通常只占query的0.0x%,所以并不为人所重视。而且在传统Web应用上,query错误对用户而言影响并不大,只是重新刷新一下页面就OK了。最近的基础改造中,把很多应用作为service运行,无法提示用户重新刷新,这种情况下,可能就会影响到服务的品质。

» 阅读全文

Tags: php, mysql

php效率优化

Tags: php, 效率, 优化

PHP 5.x COM functions safe_mode and disable_function bypass

//php 5.x COM functions safe_mode and disable_function bypass   
  
//author: shinnai   
//mail: shinnai[at]autistici[dot]org   
//site: http://shinnai.altervista.org   
  
//dork: intitle:phpinfo intext:"php version" +windows (thanks to rgod)   
  
//Tested on xp Pro sp2 full patched, worked both from the cli and on apache   

» 阅读全文

Tags: php, 漏洞

搞定了静态

弄了一晚上,终于把SEBUG完全转成了静态。

以后添加完成后就可以直接生成HTML了,不用再用伪静态了,呵呵。静态还是蛮好,就像轮回说的,就算数据库挂掉了,一样可以正常访问。

希望搜索引擎也会多多的光顾一些。也希望大家多多支持,谢谢CCTV,谢谢……

Tags: sebug, php, 技术

PHP Security-Shell RFI Scanner

php Security-Shell RFI scanner

 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          * 
*   Test over by cnfjhh

» 阅读全文

Tags: php, 代码收藏, scanner

Grab email addresses from MySQL

  #Grab email addresses from MySQL

» 阅读全文

Tags: 代码收藏, php

Records:681234567