黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图

您现在的位置: 黑客风云 >> 黑客文章 >> 黑客入门 >> 黑软介绍 >> 正文
·没有路由密码权限时的鸽08-23·上网安全 Vista自我防范10-11
·让濒临崩溃的Windows XP10-11·有备无患,快速自制救急10-11
·要你好看!Windows看图工10-11·空间赞助网提供不同类型10-11
·讨论net.exe和net1.exe的10-10·让3389远程桌面传输更通10-10
·巧妙入侵渗透赌博站10-10·Aspx空间扫权限工具10-10
·Windows2003最新提权工具10-10·易淘乐提供100M免费全能10-10
·系统开机密码忘了不着急10-09·中意网络提供免费100M免10-09
·与众不同 Windows XP开始10-08·让桌面图标翻跟斗 在XP上10-08
·上海宽元站长资助计划-提10-08·个性化Windows XP的任务10-07
·趣盘提供3G免费网络硬盘10-07·秀山热线提供200MB免费全10-07
·一次艰辛的提权过程10-06·成功入侵IT大卖场的渗透10-06
·mysqlhack- MYSQL利用工10-06·lanker一句话PHP后门客户10-06
·WIXI提供3G免费多媒体网10-06·新人网络提供100M/ftp免10-06
·如何利用QQ带来高流量10-05·UuShare提供免费网络文件10-05
[组图]Grep与web漏洞挖掘+一款WIN下的GREP软件
      ★★★★★

Grep与web漏洞挖掘+一款WIN下的GREP软件

文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2007-5-14 8:58:33

a.下面的grep(http://www.interlog.com/~tcharron/grep.html)不支持-r参数,可以使用下面的格式:grep -in "\(include\|require\)" C:\test\*.php C:\test\admin\*.php
也可以使用cygwin移植来的grep(http://zhouzhen.eviloctal.org/Look.asp?LogID=814)

b.多个关键词or模式使用|,如果使用and模式,可以使用下面的管道模式:grep -in "\select\|$aid" C:\test\read.php |grep -i "from"]

1.包含漏洞

关键词: include require
C:\>grep -in "\(include\|require\)" C:\test\*.php
config.php:10:include 'forbid.php';
conn.inc.php:10:include 'forbid.php';
conn.php:10:include 'forbid.php';
global.php:10:include 'forbid.php';
global.php:16:require_once('conn.inc.php');
global.php:17:require_once('conn.php');

2.SQL Injection

关键词: select 变量名
C:\>grep -in "\select" C:\test\read.php
15:$query=$db->query("select * FROM ".$tablepre."content where aid=$aid");

C:\>grep -in "\select\|$aid" C:\test\read.php
13:$aid=$_GET['aid'];
14:$db->query("update ".$tablepre."content SET hits=hits+1 where aid='$aid'");
15:$query=$db->query("select * FROM ".$tablepre."content where aid=$aid");

3.CMD Injection

关键词: exec system popen passthru proc_open 等

C:\>grep -in "\(exec\|system\|popen\|passthru\|proc_open\)" C:\test\phpspy.php
413: $a = $shell->ShellExecute($_POST['program'],$_POST['prog']);
602: $program = isset($_POST['program']) ? $_POST['program'] : "c:\wi
nnt\system32\cmd.exe";
613: $execfuncs = (substr(PHP_OS, 0, 3) == 'WIN') ? array('system'=>'system',
'passthru'=>'passthru','exec'=>'exec','shell_exec'=>'shell_exec','popen'=>'popen
','wscript'=>'Wscript.Shell') : array('system'=>'system','passthru'=>'passthru',
'exec'=>'exec','shell_exec'=>'shell_exec','popen'=>'popen');
615: $tb->tdbody('选择执行函数: '.$tb->makeselect(array('name'=>'execfunc','o
ption'=>$execfuncs,'selected'=>$execfunc)).' 输入命令: '.$tb->makeinput('command
',$_POST['command'],'','text','60').' '.$tb->makeinput('','Run','','submit'));
620: if ($execfunc=="system") {
621: system($_POST['command']);
622: } elseif ($execfunc=="passthru") {
623: passthru($_POST['command']);

4.Code Injection

关键词:eval preg_replace

C:\>grep -in "\eval\|preg_replace" C:\test\*.php
phpspy.php:1034: eval('$hexdtime = "' . $hexdtime . '";');

5.变量提交方式

关键词:GET POST COOKIE SERVER REQUEST

C:\>grep -in "_\GET\|POST\|COOKIE\|SERVER\|REQUEST" C:\test\list.php
13:$sid=$_GET['sid'];
14:if($_GET['page']) {
15: $page=$_GET['page'];

6.cookie和session

关键词: cookie session

C:\>grep -in "\session\|cookie" C:\test\admin\*.php
global.php:16:if(!isset($_COOKIE['IN'])) {
index.php:13:if(!isset($_COOKIE['IN'])) {
job.php:13:if(!isset($_COOKIE['IN'])) {
login.php:22: setcookie("IN","$admin");
logout.php:11:setcookie("IN","");
main.php:14:isset($_COOKIE) ? $ifcookie="SUCCESS" : $ifcookie="FAIL";

7.文件函数

关键词:readfile fopen upload copy opendir fwrite unlink 等

........
希望大家继续! :)

参考(grep使用说明):[下面都是google得到的 :)]
http://man.chinaunix.net/newsoft/grep/open.htm
http://cmpp.linuxforum.net/cman-html/man1/grep.1.html
http://fanqiang.chinaunix.net/a1/b5/20020315/080200138.html
http://if.ustc.edu.cn/~ygwu/blog/archives/000535.html
http://net.pku.edu.cn/~yhf/tao_regexps_zh.html#WhatAreRegularExpressions
http://www.zdnet.com.cn/developer/tech/story/0,2000081602,39077620,00.htm

另外今天在s0n9那里看到一款WIN下的GREP软件


http://sunlei87.free.fr/attachments/200610/vgrep.zip

[1] [2] 下一页

文章录入:cainiaowang    责任编辑:cainiaowang 
【字体:
Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
ICP备案:冀06009886