<?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>HackGou In Lamp&#124;憨狗点灯 &#187; Security_Resource</title>
	<atom:link href="http://hackgou.itbbq.com/category/security_resource/feed" rel="self" type="application/rss+xml" />
	<link>http://hackgou.itbbq.com</link>
	<description>LAMP开放的是代码，是接口，是互操作性</description>
	<lastBuildDate>Thu, 15 Jul 2010 14:23:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>最近查找Debug工具和文章的时候发现的好东西</title>
		<link>http://hackgou.itbbq.com/%e6%9c%80%e8%bf%91%e6%9f%a5%e6%89%bedebug%e5%b7%a5%e5%85%b7%e5%92%8c%e6%96%87%e7%ab%a0%e7%9a%84%e6%97%b6%e5%80%99%e5%8f%91%e7%8e%b0%e7%9a%84%e5%a5%bd%e4%b8%9c%e8%a5%bf.html</link>
		<comments>http://hackgou.itbbq.com/%e6%9c%80%e8%bf%91%e6%9f%a5%e6%89%bedebug%e5%b7%a5%e5%85%b7%e5%92%8c%e6%96%87%e7%ab%a0%e7%9a%84%e6%97%b6%e5%80%99%e5%8f%91%e7%8e%b0%e7%9a%84%e5%a5%bd%e4%b8%9c%e8%a5%bf.html#comments</comments>
		<pubDate>Sat, 05 Feb 2005 13:07:44 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://blog.itbbq.com/_2005_02_05_%e6%9c%80%e8%bf%91%e6%9f%a5%e6%89%bedebug%e5%b7%a5%e5%85%b7%e5%92%8c%e6%96%87%e7%ab%a0%e7%9a%84%e6%97%b6%e5%80%99%e5%8f%91%e7%8e%b0%e7%9a%84%e5%a5%bd%e4%b8%9c%e8%a5%bf/</guid>
		<description><![CDATA[ 
最近查找Debug工具和文章的时候发现的好东西，摘录部分目录：
Debug Toolkit
28 Mar 2000Advanced
A complete debug toolkit to add intelligent debugging capability to your application.
http://www.codeproject.com/debug/#General
上面有很多值得一看的东西：
Debug Tutorial Part 1: Beginning Debugging Using CDB and NTSD
20 Mar 2004Beginner
Learn how to debug problems in software.
Debug Tutorial Part 2: The Stack
29 Mar 2004
Introduction to the most important ally in the fight against bugs, the stack.
Debug Tutorial Part 3: The [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/%e6%9c%80%e8%bf%91%e6%9f%a5%e6%89%bedebug%e5%b7%a5%e5%85%b7%e5%92%8c%e6%96%87%e7%ab%a0%e7%9a%84%e6%97%b6%e5%80%99%e5%8f%91%e7%8e%b0%e7%9a%84%e5%a5%bd%e4%b8%9c%e8%a5%bf.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ip4和ip6的sockaddr_in 结构解释</title>
		<link>http://hackgou.itbbq.com/ip4%e5%92%8cip6%e7%9a%84sockaddr_in-%e7%bb%93%e6%9e%84%e8%a7%a3%e9%87%8a.html</link>
		<comments>http://hackgou.itbbq.com/ip4%e5%92%8cip6%e7%9a%84sockaddr_in-%e7%bb%93%e6%9e%84%e8%a7%a3%e9%87%8a.html#comments</comments>
		<pubDate>Sat, 05 Feb 2005 12:03:48 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://blog.itbbq.com/2005_02_05_ip4%e5%92%8cip6%e7%9a%84sockaddr_in-%e7%bb%93%e6%9e%84%e8%a7%a3%e9%87%8a/</guid>
		<description><![CDATA[ 
struct sockaddr_in {
        short   sin_family;
        u_short sin_port;
        struct  in_addr sin_addr;
        char    sin_zero[8];
};
struct sockaddr_in6 {
        short   sin6_family;
        u_short sin6_port;
        u_long  sin6_flowinfo;
        struct  in6_addr sin6_addr;
        u_long  sin6_scope_id;
};
struct sockaddr_in6_old {
        short   sin6_family;       
        u_short sin6_port;         
        u_long  sin6_flowinfo;     
        struct  in6_addr sin6_addr; 
};
sin_family字段必须设为AF_INET，以告知sock我们此时正在使用IP地址家族
SOCKADDR_IN结构的sin_addr字段用于把一个IP地址保存为一个4字节的数，它是无符
号长整数类型。根据这个字段的不同用法，还可表示一个本地或远程IP地址。IP地址一般是
用“互联网标准点分表示法”（像a.b.c.d一样）指定的，每个字母代表一个字节数，从左到右
分配一个4字节的无符号长整数。最后一个字段sin_zero，只充当填充项的职责，以使
SOCKADDR_IN结构和SOCKADDR结构的长度一样。
The in_addr structure represents a host by its Internet address.
typedef struct in_addr
 {
  union {
    struct {
           u_char s_b1,s_b2,s_b3,s_b4;   
     } S_un_b;   
    [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/ip4%e5%92%8cip6%e7%9a%84sockaddr_in-%e7%bb%93%e6%9e%84%e8%a7%a3%e9%87%8a.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Win2000下进程隐藏的另外一种方案</title>
		<link>http://hackgou.itbbq.com/win2000%e4%b8%8b%e8%bf%9b%e7%a8%8b%e9%9a%90%e8%97%8f%e7%9a%84%e5%8f%a6%e5%a4%96%e4%b8%80%e7%a7%8d%e6%96%b9%e6%a1%88.html</link>
		<comments>http://hackgou.itbbq.com/win2000%e4%b8%8b%e8%bf%9b%e7%a8%8b%e9%9a%90%e8%97%8f%e7%9a%84%e5%8f%a6%e5%a4%96%e4%b8%80%e7%a7%8d%e6%96%b9%e6%a1%88.html#comments</comments>
		<pubDate>Wed, 01 Dec 2004 16:09:54 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/2004_12_02_win2000%e4%b8%8b%e8%bf%9b%e7%a8%8b%e9%9a%90%e8%97%8f%e7%9a%84%e5%8f%a6%e5%a4%96%e4%b8%80%e7%a7%8d%e6%96%b9%e6%a1%88/</guid>
		<description><![CDATA[ 
Win2000下进程隐藏的另外一种方案
创建时间：2003-09-15
文章属性：原创
文章提交：pjf_ (pjf_at_ustc.edu)
十分抱歉，匆匆写了几句代码有点bug，即“ZwOpenSection(&#038;g_hMPM,SECTION_MAP_WRITE&#124;SECTION_MAP_WRITE,&#038;attributes)”使得第一次运行返回失败，请删除原文，改正为：
pjf (jfpan20000@sina.com)
上次在CVC提到了这东西，因为很简单觉得没必要多说什么，但有人要求写全，所以补充几句：

很多帖子对此论题作了分析，比如APIHOOK、系统服务HOOK等等，至于远线程注入没有自己的进程，本不算“隐藏”。
这里写一个2000下的完全隐藏方法，很简单，也没什么新意。
在讲解之前，首先提一提一些结构，进程执行体块中有数个进程相关链，其中之一是活动进程链。此链的重要
作用之一就是在查询系统信息时供遍历当前活动进程，很有意思的是M$可能因效率因素使它被排除出进程核心块，
意味进线程切换等操作时并不利用它，进一步说改写它也不该有不可忽视的问题（此即本方案的基础）。
怎么做很明显了，在活动进程双向链中删除想要得隐藏的进程既可，核心调试器（如softice/proc）亦查不出来。
2000下的隐藏当前进程的代码如下：
#include&#60;windows.h&#62;
#include&#60;Accctrl.h&#62;
#include&#60;Aclapi.h&#62;
#define NT_SUCCESS(Status) ((NTSTATUS)(Status) &#62;= 0)
#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
#define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L)
typedef LONG NTSTATUS;
typedef struct _IO_STATUS_BLOCK
{
NTSTATUS Status;
ULONG Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
typedef struct _UNICODE_STRING
{
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
} UNICODE_STRING, *PUNICODE_STRING;
#define OBJ_INHERIT 0&#215;00000002L
#define OBJ_PERMANENT 0&#215;00000010L
#define OBJ_EXCLUSIVE 0&#215;00000020L
#define OBJ_CASE_INSENSITIVE 0&#215;00000040L
#define OBJ_OPENIF 0&#215;00000080L
#define OBJ_OPENLINK 0&#215;00000100L
#define OBJ_KERNEL_HANDLE 0&#215;00000200L
#define OBJ_VALID_ATTRIBUTES 0&#215;000003F2L
typedef struct _OBJECT_ATTRIBUTES
{
ULONG Length;
HANDLE RootDirectory;
PUNICODE_STRING ObjectName;
ULONG Attributes;
PVOID SecurityDescriptor;
PVOID SecurityQualityOfService;
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
typedef NTSTATUS (CALLBACK* ZWOPENSECTION)(
OUT [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/win2000%e4%b8%8b%e8%bf%9b%e7%a8%8b%e9%9a%90%e8%97%8f%e7%9a%84%e5%8f%a6%e5%a4%96%e4%b8%80%e7%a7%8d%e6%96%b9%e6%a1%88.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Win2K下的API函数的拦截</title>
		<link>http://hackgou.itbbq.com/win2k%e4%b8%8b%e7%9a%84api%e5%87%bd%e6%95%b0%e7%9a%84%e6%8b%a6%e6%88%aa.html</link>
		<comments>http://hackgou.itbbq.com/win2k%e4%b8%8b%e7%9a%84api%e5%87%bd%e6%95%b0%e7%9a%84%e6%8b%a6%e6%88%aa.html#comments</comments>
		<pubDate>Wed, 01 Dec 2004 16:08:34 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/2004_12_02_win2k%e4%b8%8b%e7%9a%84api%e5%87%bd%e6%95%b0%e7%9a%84%e6%8b%a6%e6%88%aa/</guid>
		<description><![CDATA[Win2K下的API函数的拦截 原始文档：http://www.xfocus.net/articles/200201/336.html 创建时间：2002-01-21 浏览次数：290 原创：tomh (tomh_at_yeah.net) 这么多高手在这里，哎，小弟愿意向各位高手学习Api拦截并不是一个新的技术，很多商业软件都采用这种技术。对windows的Api函数的拦截，不外乎两种方法，第一种是Mr. Jeffrey Richter 的修改exe文件的模块输入节，种方法，很安全，但很复杂，而且有些exe文件，没有Dll的输入符号的列表，有可能出现拦截不到的情况。第二种方法就是常用的JMP XXX的方法，虽然很古老，却很简单实用。本文一介绍第二种方法在Win2k下的使用。第二种方法，Win98/me 下因为进入Ring0级的方法很多，有LDT,IDT,Vxd等方法，很容易在内存中动态修改代码，但在Win2k下，这些方法都不能用，写WDM太过复杂，表面上看来很难实现，其实不然。Win2k为我们提供了一个强大的内存Api操作函数&#8212;VirtualProtectEx，WriteProcessMemeory,ReadProcessMemeory，有了它们我们就能在内存中动态修改代码了，其原型为：BOOL VirtualProtectEx(HANDLE hProcess, // 要修改内存的进程句柄LPVOID lpAddress, // 要修改内存的起始地址DWORD dwSize, // 修改内存的字节DWORD flNewProtect, // 修改后的内存属性PDWORD lpflOldProtect // 修改前的内存属性的地址);BOOL WriteProcessMemory(HANDLE hProcess, // 要写进程的句柄LPVOID lpBaseAddress, // 写内存的起始地址LPVOID lpBuffer, // 写入数据的地址DWORD nSize, // 要写的字节数LPDWORD lpNumberOfBytesWritten // 实际写入的子节数);BOOL ReadProcessMemory(HANDLE hProcess, // 要读进程的句柄LPCVOID lpBaseAddress, // 读内存的起始地址LPVOID lpBuffer, // 读入数据的地址DWORD nSize, [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/win2k%e4%b8%8b%e7%9a%84api%e5%87%bd%e6%95%b0%e7%9a%84%e6%8b%a6%e6%88%aa.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 2000缓冲区溢出技术原理-转载</title>
		<link>http://hackgou.itbbq.com/windows-2000%e7%bc%93%e5%86%b2%e5%8c%ba%e6%ba%a2%e5%87%ba%e6%8a%80%e6%9c%af%e5%8e%9f%e7%90%86-%e8%bd%ac%e8%bd%bd.html</link>
		<comments>http://hackgou.itbbq.com/windows-2000%e7%bc%93%e5%86%b2%e5%8c%ba%e6%ba%a2%e5%87%ba%e6%8a%80%e6%9c%af%e5%8e%9f%e7%90%86-%e8%bd%ac%e8%bd%bd.html#comments</comments>
		<pubDate>Wed, 01 Dec 2004 16:05:11 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://hackgou.itbbq.com/2004_12_02_windows-2000%e7%bc%93%e5%86%b2%e5%8c%ba%e6%ba%a2%e5%87%ba%e6%8a%80%e6%9c%af%e5%8e%9f%e7%90%86-%e8%bd%ac%e8%bd%bd/</guid>
		<description><![CDATA[前言:
在看Jason著backend翻译的《Windows 2000缓冲区溢出入门》时觉得过于简单,没有讲到真正的
原理,我简直不敢相信那会是老外写的文章. 相反在看ipxodi和袁哥的缓冲区溢出原理和高级
ShellCode编写技巧时我觉得写的太好了,非常专业,简直是一种艺术,看来我国的安全技术已经在
向欧美等技术先进国家迈进。但是面向初学者的,进行详细分析的缓冲溢出入门文章还是很少(我
还没有看到),所以我下决心写了这篇文章,从C的局部变量分配以及它和堆栈的关系、返回地址和
堆栈的关系、局部变量和返回地址以及堆栈的关系开始写起,并在讲述完原理后进行简单的应用,
使理论和应用相结合,以给广大初学缓冲溢出的朋友一点小小的帮助,本文还是具有典型性的,通
过本文的学习,可以让我们从一个普通的C程序员,了解到更加底层的技术,本文虽是面向初学者(
指初学缓冲溢出,而不是初学C语言),作者假定你(读者)已经是一位熟练的C程序员,并且了解一些
Asm编程技术。我也是刚学缓冲区溢出不久,这是我第一次写溢出技术,所以难免有错误的地方,还
请大家指正,在ipxodi和袁哥的文章中我学到了很多东西,但ipxodi和袁哥和文章比较深比较专业
,初学者学习起来有些困难,特别我又是非计算机专业的(我和绿盟的小四哥一样是电脑会计专业的
,向小四哥学习,呵呵!).在这里把我学习时的一点理解,一点经验介绍给大家,希望对广大学习缓冲
溢出的朋友有所帮助!

第一章　存储分配，局部内存变量，堆栈和函数调用
1,首先写一个简单的C字符串拷贝程序
//test.c
#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
#include &#60;string.h&#62;
void overflow(void)
{
char buf[10];
strcpy(buf,&#8221;aaaaaaaaaa&#8221;);
}//end overflow
int main(void)
{
overflow();
return 0;
}//end main
2,按F11进入&#8221;Step into&#8221;调试模式,其实只需要留意对我们研究和学习有用的汇编程序段,如下:
1: #include &#60;stdio.h&#62;
2: #include &#60;stdlib.h&#62;
3: #include &#60;string.h&#62;
4:
5: void overflow(void)
6: {
00401020 55 push ebp
00401021 8B EC mov ebp,esp
00401023 83 EC 4C sub esp,4Ch
00401026 53 push ebx
00401027 56 push esi
00401028 57 push edi
00401029 8D 7D B4 lea edi,[ebp-4Ch]
0040102C B9 13 00 00 00 mov ecx,13h
00401031 [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/windows-2000%e7%bc%93%e5%86%b2%e5%8c%ba%e6%ba%a2%e5%87%ba%e6%8a%80%e6%9c%af%e5%8e%9f%e7%90%86-%e8%bd%ac%e8%bd%bd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>绕过内核调度链表进程检测</title>
		<link>http://hackgou.itbbq.com/%e7%bb%95%e8%bf%87%e5%86%85%e6%a0%b8%e8%b0%83%e5%ba%a6%e9%93%be%e8%a1%a8%e8%bf%9b%e7%a8%8b%e6%a3%80%e6%b5%8b.html</link>
		<comments>http://hackgou.itbbq.com/%e7%bb%95%e8%bf%87%e5%86%85%e6%a0%b8%e8%b0%83%e5%ba%a6%e9%93%be%e8%a1%a8%e8%bf%9b%e7%a8%8b%e6%a3%80%e6%b5%8b.html#comments</comments>
		<pubDate>Mon, 05 Jul 2004 15:39:38 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://blog.itbbq.com/2004_07_05_%e7%bb%95%e8%bf%87%e5%86%85%e6%a0%b8%e8%b0%83%e5%ba%a6%e9%93%be%e8%a1%a8%e8%bf%9b%e7%a8%8b%e6%a3%80%e6%b5%8b/</guid>
		<description><![CDATA[绕过内核调度链表进程检测
创建时间：2004-04-22 更新时间：2004-04-22
文章属性：原创
文章提交：SoBeIt (kinsephi_at_hotmail.com)
绕过内核调度链表进程检测                                                     [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/%e7%bb%95%e8%bf%87%e5%86%85%e6%a0%b8%e8%b0%83%e5%ba%a6%e9%93%be%e8%a1%a8%e8%bf%9b%e7%a8%8b%e6%a3%80%e6%b5%8b.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Resource Kit介绍(一）</title>
		<link>http://hackgou.itbbq.com/windows-resource-kit%e4%bb%8b%e7%bb%8d%e4%b8%80%ef%bc%89.html</link>
		<comments>http://hackgou.itbbq.com/windows-resource-kit%e4%bb%8b%e7%bb%8d%e4%b8%80%ef%bc%89.html#comments</comments>
		<pubDate>Fri, 02 Jul 2004 02:38:30 +0000</pubDate>
		<dc:creator>HackGou</dc:creator>
				<category><![CDATA[Security_Resource]]></category>

		<guid isPermaLink="false">http://blog.itbbq.com/_2004_07_02_windows-resource-kit%e4%bb%8b%e7%bb%8d%e4%b8%80%ef%bc%89/</guid>
		<description><![CDATA[ 
看了gouy2k的Windows * Resource Kit的介绍原来大家的反响挺大的，也来个帖子凑凑热闹：
  Windows * Resource Kit望文生义就是windows资源工具包。它是M$提供的从PC平台到CE、从都win98到win2003的强力系统管理工具，可以说是系统管理员的必备工具，（也是H一族的必须武器)。当然天下没有完全免费的午餐：在2000版中的有些工具是需要charge的。对于我们这些平头百姓来说动辄XXXX$的东西可不是支付得起得。让人欣慰得是2003版得已经是free的了。gouy2k的2003版本是在sometips上的。看大家的反应好象有人没法下载，大家可以到这儿下载
Windows 2003 Resource
至于以前版本的Resource Kit可以到这儿查看详细资料
以往Resource Kit
这些工具数量是相当庞大的（以我的2000版本和2003版为列，缺少money，所以就缺少xp版本的:P）：
E:\Program Files\xp_Support Tools&#62;dir *.exe &#124;find &#8220;exe&#8221; /i /c
180
E:\Program Files\xp_Support Tools&#62;
实际上还有很多工具我没有下载，这样算下来起码超过250多个。
这些工具中大部分都是基于命令行的工具，这可要我们好好练习键盘哦:P
当然也为懒人们准备了一些GUI的工具。同时为了方便在命令行使用这些人间大炮。最好将他们的目录加到%PATH%中去，以方便我们随时随地地差遣他们。（2003版的不用了，在安装完成后会自动完成这些，而自己下载的2000版则需要手工添加，当然哦，我这样的懒人肯定是将它们安装在一堆儿里，就啥都可以免了）
说它们功能非常强大，这可不是吹的 哦 ，随便选个以a字打头的程序：apimon.exe这是个GUI的工具，从名字(API monitor)上就可以看出，这个东东可以监视程序调用哪些系统API。（这好象和我们的H一族没有关系，好，继续）
我们再来看看SrvInfo.exe
SrvInfo  /?
Version 3.00.10
=====================================================
Remotely gather information about a target server.
Assume local machine if no computer name is provided.
=====================================================
Usage: SRVINFO [[-?&#124;-ns&#124;-d&#124;-v&#124;-s] \\computer_name]
   -?:  Show usage
   -ns: Do NOT show any service information
   -nf: Do [...]]]></description>
		<wfw:commentRss>http://hackgou.itbbq.com/windows-resource-kit%e4%bb%8b%e7%bb%8d%e4%b8%80%ef%bc%89.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
