windbg

Size: px
Start display at page:

Download "windbg"

Transcription

1 windbg 调试器原理原理的简单分析 [Author] ReverseMan [Blog] [ QQ/MSN ] / fanxinghua2314@126.com 为了方便大家的阅读, 首先列出本文的目录 本文目录 : 1 分析原因 2 分析工具及资源 3 Windbg 调试原理简介 4 ReactOS 源码剖析 5 Windbg 命令实战之条件断点及封包分析 6 总结 1. 分析原因在一次调试中, 我在 windbg 的调试窗口中在 nt!ntcreatefile 处下了个条件断点, 命令大体是这样子的 : kd> bp nt!ntcreatefile "j([esp+4]='xxx') '';'g'" 然后, 等我回到虚拟机中, 打开 xuetr 中后发现 SSDT 钩子标签项中有如下的记录 : 那么我在本机中下的条件断点如何会改变虚拟机的状态的呢? 而且奇怪的是 xuetr 所发现的 inline hook 的原始函数地址和当前函数地址竟然是一样的 同样是在内核模块中 由于是初学 windbg, 并且对 windbg 的调试原理一无所知 所以起了调戏一番的想法, 想一探究竟, 下面就是我调试的整个过程, 过程中某部分可能有更快捷的调试方法和下断方法 我是一边调试一边学习, 所以请高手莫要见怪 2. 分析工具及资源调试平台 :server->windows xp sp3,client->sun virtualbox3.1 + windows xp sp2 调试工具 :windbg OllyDbg1.1 参考资料 :ReactOS SRC 3. Windbg 调试原理简介关于 windbg 的调试原理, 我之前一直认为是其所有的功能实现都是在其内部完成的 其实不然,windbg 只是整个调试实现中的接口程序 其核心功能的实现均是在被调试系统内核中实现的 也就是说,windows 系统的内核已经集成了内核调试器的功能 而 windbg 调试器做的工作就是识别用户的命令, 然后根据不同命令封装成一定的数据格式, 然后通过串口发送给被调试系统的内核 被调试系统内核在接受到数据包后, 根据数据包的内容去修改内核中的某些数据, 使得内核调试器能够捕获特定的异常 内核调试器捕获到异常后, 根据异常的类型以及相关的信息封装成数据包通过串口发送给 windbg.windbg 调试器根据结果向调试者反馈结果

2 以上是 windbg 调试器的简单流程介绍 下面根据 ReactOS 的源码来分析下内核调试器的某些原理实现 NOTE: 由于是参考 ReactOS 的源码, 而不是真正的 windows 源码 所以分析结果的正确性依赖于 ReactOS 源码和真实 windows 源码相似度的大小 4. ReactOS 源码剖析本来想参考 WRK1.2 的源码来着, 无奈 WRK 的源码不完整, 很多功能代码看不到 所以最终使用 ReactOS 源码做一下简要分析 关于 ReactOS 这个项目的介绍, 请 baidu 或者 google 下就 OK 了 下面开始分析 ReactOS 中内核调试器部分的源码 分析过程中的函数大部分是摘录, 如需查看完整代码请参考 ReactOS(Version:0.3.11) 源码 首先, 是系统初始化的代码, 是在函数 KdInitSystem 中实现 首先默认初始化调试分发函数为 KdpStub: <Kdinit.c> /* Set the Debug Routine as the Stub for now */ KiDebugRoutine = KdpStub; 首先,KiDebugRoutine 是内核调试器的一个全局的调试函数指针 调试过程中, 内核调试器始终通过 KiDebugRoutine 调用真正的调试处理函数 其定义如下 : <kddata.c> PKDEBUG_ROUTINE KiDebugRoutine = KdpStub; 其中,PKDEBUG_ROUTINE 是一个函数指针, 定义如下 : <kd.h> typedef BOOLEAN (NTAPI *PKDEBUG_ROUTINE)( IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, // 异常发生的记录, 相关信息保存在此结构中 IN PCONTEXT Context, // 异常发生的上下文 IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChance // 内核异常会处理两次, 此变量标识是第几次 ); 继续看函数 KdpInitSystem 函数的代码 : <kdinit.c>...// 调试器数据块初始化 /* Check if we have a loader block */ if (LoaderBlock)// 函数 KdpInitSystem 传入的参数 2, 包含系统启动的参数 /* Get the image entry */ LdrEntry = CONTAINING_RECORD(LoaderBlock->LoadOrderListHead.Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); //CONTAINING_RECORD 宏用于根据结构体某一成员变量获取结构体的起始地址值 /* Save the Kernel Base */ PsNtosImageBase = (ULONG_PTR)LdrEntry->DllBase; KdVersionBlock.KernBase = (ULONG64)(LONG_PTR)LdrEntry->DllBase;

3 /* Check if we have a command line */ CommandLine = LoaderBlock->LoadOptions;// 从系统盘下 Boot.ini 文件读取得到的 if (CommandLine) /* Upcase it */ _strupr(commandline); /* Assume we'll disable KD */ EnableKd = FALSE; /* Check for CRASHDEBUG, NODEBUG and just DEBUG */ if (strstr(commandline, "CRASHDEBUG")) KdPitchDebugger = FALSE; else if (strstr(commandline, "NODEBUG")) KdPitchDebugger = TRUE; else if ((DebugLine = strstr(commandline, "DEBUG"))!= NULL) // 查找系统是否是以 DEBUG 模式启动 /* Enable KD */ EnableKd = TRUE;// 启用 KD 以及 Windbg 等调试器... // 下面是额外的 options 检查及处理 下面继续 : <Kdinit.c> /* Initialize the debugger if requested */ if ((EnableKd) && (NT_SUCCESS(KdDebuggerInitialize0(LoaderBlock)))) /* Now set our real KD routine */ KiDebugRoutine = KdpTrap;// 更换调试函数为 kdptrap /* Check if we've already initialized our structures */ if (!KdpDebuggerStructuresInitialized) /* Set the Debug Switch Routine and Retries*/ KdpContext.KdpDefaultRetries = 20; KiDebugSwitchRoutine = KdpSwitchProcessor; /* Initialize the Time Slip DPC */ KeInitializeDpc(&KdpTimeSlipDpc, KdpTimeSlipDpcRoutine, NULL); KeInitializeTimer(&KdpTimeSlipTimer); ExInitializeWorkItem(&KdpTimeSlipWorkItem, KdpTimeSlipWork, NULL); /* First-time initialization done! */

4 KdpDebuggerStructuresInitialized = TRUE; /* Initialize the timer */ KdTimerStart.QuadPart = 0;// 初始化 timer. 调试过程中使用时钟进行通信及超时重传 /* Officially enable KD */ KdPitchDebugger = FALSE; KdDebuggerEnabled = TRUE;// 启用调试器... 至此, 内核调试模块的初始化就已经完成了 其流程大致如此 : 首先, 初始化调试函数为默认的 KdpStub 和其他一些相关的初始化工作 然后, 扫描启动参数是否有关键字 DEBUG 来决定是否启用 KD 等调试器 如果有则更换内核调试函数为 kdptrap 最后, 保存调试相关数据, 初始化 Timer 并结束内核调试的初始化工作 由此可知, 函数 KdpTrap 是整个调试过程的处理函数 下面分析该函数 : BOOLEAN NTAPI KdpTrap(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChanceException) BOOLEAN Unload = FALSE; ULONG_PTR ProgramCounter; BOOLEAN Handled; NTSTATUS ReturnStatus; USHORT ReturnLength; if ((ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) && (ExceptionRecord->ExceptionInformation[0]!= BREAKPOINT_BREAK)) // 处理 STATUS_BREAKPOINT 异常, 包括 Print Prompt Load/Unload sysmbols 等 /* Save Program Counter */ ProgramCounter = KeGetContextPc(ContextRecord); /* Check what kind of operation was requested from us */ switch (ExceptionRecord->ExceptionInformation[0]) /* DbgPrint */ case BREAKPOINT_PRINT://DbgPrint 调用 /* Call the worker routine */ ReturnStatus = KdpPrint((ULONG)KdpGetParameterThree(ContextRecord), (ULONG)KdpGetParameterFour(ContextRecord), (LPSTR)ExceptionRecord->

5 ExceptionInformation[1], (USHORT)ExceptionRecord-> ExceptionInformation[2], PreviousMode, TrapFrame, ExceptionFrame, &Handled); /* Update the return value for the caller */ KeSetContextReturnRegister(ContextRecord, ReturnStatus); break; /* DbgPrompt */ case BREAKPOINT_PROMPT://Prompt 调用 /* Call the worker routine */ ReturnLength = KdpPrompt((LPSTR)ExceptionRecord-> ExceptionInformation[1], (USHORT)ExceptionRecord-> ExceptionInformation[2], (LPSTR)KdpGetParameterThree(ContextRecord), (USHORT)KdpGetParameterFour(ContextRecord), PreviousMode, TrapFrame, ExceptionFrame); Handled = TRUE; /* Update the return value for the caller */ KeSetContextReturnRegister(ContextRecord, ReturnLength); break; /* DbgUnLoadImageSymbols */ case BREAKPOINT_UNLOAD_SYMBOLS: /* Drop into the load case below, with the unload parameter */ Unload = TRUE; /* DbgLoadImageSymbols */ case BREAKPOINT_LOAD_SYMBOLS:// 加载符号表 /* Call the worker routine */ KdpSymbol((PSTRING)ExceptionRecord-> ExceptionInformation[1], (PKD_SYMBOLS_INFO)ExceptionRecord-> ExceptionInformation[2], Unload, PreviousMode, ContextRecord, TrapFrame, ExceptionFrame); Handled = TRUE; break;

6 /* DbgCommandString */ case BREAKPOINT_COMMAND_STRING: /* Call the worker routine */ KdpCommandString((PSTRING)ExceptionRecord-> ExceptionInformation[1], (PSTRING)ExceptionRecord-> ExceptionInformation[2], PreviousMode, ContextRecord, TrapFrame, ExceptionFrame); Handled = TRUE; /* Anything else, do nothing */ default: /* Invalid debug service! Don't handle this! */ Handled = FALSE; break; if (ProgramCounter == KeGetContextPc(ContextRecord)) /* Update it */ KeSetContextPc(ContextRecord, ProgramCounter + KD_BREAKPOINT_SIZE); else // 调用 KdpReport 处理包括 INT3 等软件中断 /* Call the worker routine */ Handled = KdpReport(TrapFrame, ExceptionFrame, ExceptionRecord, ContextRecord, PreviousMode, SecondChanceException); /* Return TRUE or FALSE to caller */ return Handled; 从 KdpTrap 函数的源码可知,KdpTrap 负责处理了 STATUS_BREAKPOINT 和 STATUS_SINGLE_STEP 异常 对于 STATUS_SINGLE_STEP 异常,KdpTrap 调用 KdpReport 处理该异常 KdpReport 的分析如下 : BOOLEAN NTAPI KdpReport(IN PKTRAP_FRAME TrapFrame,

7 IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChanceException)...// 判断异常类型以及异常处理的方式 ( 包括查找异常处理函数或者直接 pass 给调试器 ) // 下面直接 pass 给调试器 Enable = KdEnterDebugger(TrapFrame, ExceptionFrame); /* * Get the KPRCB and save the CPU Control State manually instead of * using KiSaveProcessorState, since we already have a valid CONTEXT. */ Prcb = KeGetCurrentPrcb(); KiSaveProcessorControlState(&Prcb->ProcessorState); RtlCopyMemory(&Prcb->ProcessorState.ContextFrame, ContextRecord, sizeof(context)); /* Report the new state */ Handled = KdpReportExceptionStateChange(ExceptionRecord, &Prcb->ProcessorState. ContextFrame, SecondChanceException); /* Now restore the processor state, manually again. */ RtlCopyMemory(ContextRecord, &Prcb->ProcessorState.ContextFrame, sizeof(context)); KiRestoreProcessorControlState(&Prcb->ProcessorState); /* Exit the debugger and clear the CTRL-C state */ KdExitDebugger(Enable); KdpControlCPressed = FALSE; return Handled; 函数直接调用 KdpReportExceptionStateChange 来通知异常状态改变的消息 之前, KdpReport 会调用 KdEnterDebugger 初始化 KD 以及 windbg 等接管异常所需要的条件, 包括保存 CPU 的某些状态, 锁定串口以方便 windbg 调试器使用串口传递数据等 代码详见 ReactOS 源码 KdpReportExceptionStateChange 的代码如下 : BOOLEAN NTAPI KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord, IN OUT PCONTEXT Context, IN BOOLEAN SecondChanceException) STRING Header, Data;

8 DBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange; KCONTINUE_STATUS Status; /* Start report loop */ do KdpSetCommonState(DbgKdExceptionStateChange, Context, &WaitStateChange); // 数据包通用部分的初始化, 这些数据是大部分异常的数据包都拥有的 /* Copy the Exception Record and set First Chance flag */ #if!defined(_win64) ExceptionRecord32To64((PEXCEPTION_RECORD32)ExceptionRecord, &WaitStateChange.u.Exception.ExceptionRecord); #else RtlCopyMemory(&WaitStateChange.u.Exception.ExceptionRecord, ExceptionRecord, sizeof(exception_record)); #endif WaitStateChange.u.Exception.FirstChance =!SecondChanceException; /* Now finish creating the structure */ KdpSetContextState(&WaitStateChange, Context); // 上面这些代码是初始化结构 WaitStateChange 中针对特定异常的数据的部分 /* Setup the actual header to send to KD */ Header.Length = sizeof(dbgkd_any_wait_state_change); Header.Buffer = (PCHAR)&WaitStateChange;// 数据包封装完成, 赋值给 STRING /* Setup the trace data */ DumpTraceData(&Data); Status = KdpSendWaitContinue(PACKET_TYPE_KD_STATE_CHANGE64, &Header, &Data, Context); while (Status == ContinueProcessorReselected); /* Return */ return Status; KdpReportExceptionStateChange 根据异常的上下文来初始化数据包, 并调用 KdpSendWaitContinue 通过串口发送数据包给 windbg 并等待来自 windbg 的处理结果 KCONTINUE_STATUS NTAPI KdpSendWaitContinue(IN ULONG PacketType, IN PSTRING SendHeader, IN PSTRING SendData OPTIONAL, IN OUT PCONTEXT Context) STRING Data, Header; DBGKD_MANIPULATE_STATE64 ManipulateState;

9 ULONG Length; KDSTATUS RecvCode; /* Setup the Manipulate State structure */ Header.MaximumLength = sizeof(dbgkd_manipulate_state64); Header.Buffer = (PCHAR)&ManipulateState; Data.MaximumLength = sizeof(kdpmessagebuffer); Data.Buffer = KdpMessageBuffer; KdpContextSent = FALSE; SendPacket: /* 调用 KdSendPacket 发送异常数据包给 windbg 调试器 */ KdSendPacket(PacketType, SendHeader, SendData, &KdpContext); /* If the debugger isn't present anymore, just return success */ if (KdDebuggerNotPresent) return ContinueSuccess; /* 使用 For 循环等待来自 windbg 的数据包处理结果, 接受数据是调用 KdReceivePacket 接受数据包 */ for (;;)// 循环条件为空 do /* Wait to get a reply to our packet */ RecvCode = KdReceivePacket(PACKET_TYPE_KD_STATE_MANIPULATE, &Header, &Data, &Length, &KdpContext); /*Windbg 使用确认机制来保证数据包被处理, 否则重传 */ if (RecvCode == KdPacketNeedsResend) goto SendPacket; while (RecvCode == KdPacketTimedOut); /* 根据接收到的数据包做相应的处理 */ switch (ManipulateState.ApiNumber) case DbgKdReadVirtualMemoryApi: /* 读取虚拟内存 */ KdpReadVirtualMemory(&ManipulateState, &Data, Context); break; case DbgKdWriteVirtualMemoryApi: /* 写虚拟内存 */ KdpWriteVirtualMemory(&ManipulateState, &Data, Context); break; case DbgKdGetContextApi:... case DbgKdSetContextApi:...

10 case DbgKdWriteBreakPointApi: /* 写入断点, 后面以此为例做实验 */ KdpWriteBreakpoint(&ManipulateState, &Data, Context); break;.../* 处理了包括读写内存 搜索内存 设置 / 恢复断点 继续执行 重启等所有 windbg 的功能实现 */ default: /* 错误的参数, 直接返回失败 */ KdpDprintf("Received Unhandled API %lx\n", ManipulateState.ApiNumber); Data.Length = 0; ManipulateState.ReturnStatus = STATUS_UNSUCCESSFUL; /* Send it */ KdSendPacket(PACKET_TYPE_KD_STATE_MANIPULATE, &Header, &Data, &KdpContext); break; 可以说 KdpSendWaitContinue 函数是整个内核调试器的大管家, 它根据异常的类型来调用不同的函数进行处理, 是整个调试流程的分发地所在 被调试系统和调试器进行交互式通过 KdSendPacket 和 KdReceivePacket 函数进行的 下面首先分析下 KdReceivePacket 的源码 : KDP_STATUS NTAPI KdReceivePacket( IN ULONG PacketType, OUT PSTRING MessageHeader, OUT PSTRING MessageData, OUT PULONG DataLength, IN OUT PKD_CONTEXT KdContext) UCHAR Byte = 0; KDP_STATUS KdStatus; KD_PACKET Packet; ULONG Checksum; /* Special handling for breakin packet */ if(packettype == PACKET_TYPE_KD_POLL_BREAKIN) // 包类型是中断包. 内核调试器中的包类型共有 13 种 return KdpPollBreakIn(); for (;;) /* 下面 Step1-Step5 依次读取数据包头中的 PacketLeader PacketType ByteCount

11 PackID 以及 CheckSum*/ /* Step 1 - Read PacketLeader */ KdStatus = KdpReceivePacketLeader(&Packet.PacketLeader); if (KdStatus!= KDP_PACKET_RECEIVED) /* Check if we got a breakin */ if (KdStatus == KDP_PACKET_RESEND) KdContext->KdpControlCPending = TRUE; return KdStatus; /* Step 2 - Read PacketType */ KdStatus = KdpReceiveBuffer(&Packet.PacketType, sizeof(ushort)); if (KdStatus!= KDP_PACKET_RECEIVED) /* Didn't receive a PacketType. */ return KdStatus; /* Check if we got a resend packet */ if (Packet.PacketLeader == CONTROL_PACKET_LEADER && Packet.PacketType == PACKET_TYPE_KD_RESEND) return KDP_PACKET_RESEND; /* Step 3 - Read ByteCount */ KdStatus = KdpReceiveBuffer(&Packet.ByteCount, sizeof(ushort)); if (KdStatus!= KDP_PACKET_RECEIVED) /* Didn't receive ByteCount. */ return KdStatus; /* Step 4 - Read PacketId */ KdStatus = KdpReceiveBuffer(&Packet.PacketId, sizeof(ulong)); if (KdStatus!= KDP_PACKET_RECEIVED) /* Didn't receive PacketId. */ return KdStatus; /*Step 5 -Read CheckSum*/ KdStatus = KdpReceiveBuffer(&Packet.Checksum, sizeof(ulong)); if (KdStatus!= KDP_PACKET_RECEIVED) /* Didn't receive Checksum. */

12 return KdStatus; // 下面根据接收的数据包头部的信息来做相应的处理工作 /* Step 6 - Handle control packets */ if (Packet.PacketLeader == CONTROL_PACKET_LEADER) switch (Packet.PacketType) case PACKET_TYPE_KD_ACKNOWLEDGE: // 确认包, 调试器没发一个包, 都等待一个确认包 /* Are we waiting for an ACK packet? */ if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE && Packet.PacketId == (CurrentPacketId & ~SYNC_PACKET_ID)) /* Remote acknowledges the last packet */ CurrentPacketId ^= 1; return KDP_PACKET_RECEIVED; /* That's not what we were waiting for, start over. */ continue; case PACKET_TYPE_KD_RESET:// 重置包 KDDBGPRINT("KdReceivePacket - got a reset packet\n"); KdpSendControlPacket(PACKET_TYPE_KD_RESET, 0); CurrentPacketId = INITIAL_PACKET_ID; RemotePacketId = INITIAL_PACKET_ID; /* Fall through */ case PACKET_TYPE_KD_RESEND:// 重发包 KDDBGPRINT("KdReceivePacket - got PACKET_TYPE_KD_RESEND\n"); /* Remote wants us to resend the last packet */ return KDP_PACKET_RESEND; default: KDDBGPRINT("KdReceivePacket - got unknown control packet\n"); return KDP_PACKET_RESEND; /* Did we wait for an ack packet? */ if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE) /* We received something different */ KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0); CurrentPacketId ^= 1; return KDP_PACKET_RECEIVED;

13 ...// 省略内容为检查包的完整性 -- 是否有丢失等情况发生 /* Receive the message header data */ KdStatus = KdpReceiveBuffer(MessageHeader->Buffer, MessageHeader->Length); if (KdStatus!= KDP_PACKET_RECEIVED) // 要求重新发送, 调用 KdpSendControlPacket, 最终调用 KdSendPacket 实现发包 KDDBGPRINT("KdReceivePacket - Didn't receive message header data.\n"); KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0); continue; /* 计算校验和是否正确 */ Checksum = KdpCalculateChecksum(MessageHeader->Buffer, MessageHeader->Length); /* Calculate the length of the message data */ *DataLength = Packet.ByteCount - MessageHeader->Length; /* Shall we receive messsage data? */ if (MessageData) /* Set the length of the message data */ MessageData->Length = *DataLength; /* Do we have data? */ if (MessageData->Length) KDDBGPRINT("KdReceivePacket - got data\n"); /* Receive the message data */ KdStatus = KdpReceiveBuffer(MessageData->Buffer, MessageData->Length); if (KdStatus!= KDP_PACKET_RECEIVED) /* Didn't receive data. Start over. */ KDDBGPRINT("KdReceivePacket - Didn't receive message data.\n"); KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0); continue; /* Add cheksum for message data */ Checksum += KdpCalculateChecksum(MessageData->Buffer, MessageData->Length); /* 包尾部必须是一个以 0xAA 结尾的包, 否则不合法 这个是调试器的规定 */ KdStatus = KdpReceiveBuffer(&Byte, sizeof(uchar));// 接收一个字节

14 if (KdStatus!= KDP_PACKET_RECEIVED Byte!= PACKET_TRAILING_BYTE) // PACKET_TRAILING_BYTE==0xAA KDDBGPRINT("KdReceivePacket - wrong trailing byte (0x%x), status 0x%x\n", Byte, KdStatus); KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0); continue; /* 对比校验和, 看包中是否有差错 */ if (Packet.Checksum!= Checksum) KDDBGPRINT("KdReceivePacket - wrong cheksum, got %x, calculated %x\n", Packet.Checksum, Checksum); KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0); continue; /* 发送确认包, 告诉 windbg 包成功接收 */ KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId); /* Check if the received PacketId is ok */ if (Packet.PacketId!= RemotePacketId) /* Continue with next packet */ continue; /* Did we get the right packet type? */ if (PacketType == Packet.PacketType) /* Yes, return success */ //KDDBGPRINT("KdReceivePacket - all ok\n"); RemotePacketId ^= 1; return KDP_PACKET_RECEIVED; /* We received something different, ignore it. */ KDDBGPRINT("KdReceivePacket - wrong PacketType\n"); return KDP_PACKET_RECEIVED; 从源码可以看出,KdReceivePacket 是调用 KdpReceiveBuffer 来完成数据的接收的 而 KdpReceiveBuffer 则是通过调用 KdpReceiveByte, KdpReceiveByte 再调用 KdpPollByte, 然后进入硬件抽象层调用 READ_PORT_UCHAR 函数读取串口来完成数据接收的 函数源码依次如下 : KDP_STATUS NTAPI KdpReceiveBuffer( OUT PVOID Buffer,

15 IN ULONG Size) ULONG i; PUCHAR ByteBuffer = Buffer; KDP_STATUS Status; for (i = 0; i < Size; i++) /* 一字节一字节的读取数据, 大小为 Size*/ Status = KdpReceiveByte(&ByteBuffer[i]); if (Status!= KDP_PACKET_RECEIVED) return Status; return KDP_PACKET_RECEIVED; KDP_STATUS NTAPI KdpReceiveByte(OUT PBYTE OutByte) ULONG Repeats = REPEAT_COUNT;// 尝试读取的重复次数 while (Repeats--) /* Check if data is available */ if (KdpPollByte(OutByte) == KDP_PACKET_RECEIVED) /* We successfully got a byte */ return KDP_PACKET_RECEIVED; /* Timed out */ return KDP_PACKET_TIMEOUT; KDP_STATUS NTAPI KdpPollByte(OUT PBYTE OutByte) READ_PORT_UCHAR(ComPortBase + COM_MSR); // Timing /* 调用 HAL 函数读取串口 */ if ((READ_PORT_UCHAR(ComPortBase + COM_LSR) & LSR_DR)) /* Yes, return the byte */ *OutByte = READ_PORT_UCHAR(ComPortBase + COM_DAT); return KDP_PACKET_RECEIVED; /* 返回超时 */ return KDP_PACKET_TIMEOUT; 上述函数都较为简单, 不做分析 至此, 整个接收的流程都分析完毕 下面简单分析下发送的流程, 发送过程首先调用 KdSendPacket 发送数据包 :

16 VOID NTAPI KdSendPacket( IN ULONG PacketType, IN PSTRING MessageHeader, IN PSTRING MessageData, IN OUT PKD_CONTEXT KdContext) KD_PACKET Packet; KDP_STATUS KdStatus; ULONG Retries; /* 封包过程, 依次初始化数据包包头, 包括数据包标识 数据包类型 数据包长度 校验和 */ Packet.PacketLeader = PACKET_LEADER; Packet.PacketType = PacketType; Packet.ByteCount = MessageHeader->Length; Packet.Checksum = KdpCalculateChecksum(MessageHeader->Buffer, MessageHeader->Length); /* 添加额外数据 */ if (MessageData) Packet.ByteCount += MessageData->Length; Packet.Checksum += KdpCalculateChecksum(MessageData->Buffer, MessageData->Length); Retries = KdContext->KdpDefaultRetries; do /* Set the packet id */ Packet.PacketId = CurrentPacketId; /* Send the packet header to the KD port */ KdpSendBuffer(&Packet, sizeof(kd_packet)); /* Send the message header */ KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length); /* If we have meesage data, also send it */ if (MessageData) KdpSendBuffer(MessageData->Buffer, MessageData->Length); /* 发送结束符 0xAA */ KdpSendByte(PACKET_TRAILING_BYTE); /* 等待接收确认包 */ KdStatus = KdReceivePacket(PACKET_TYPE_KD_ACKNOWLEDGE, NULL, NULL, 0,

17 KdContext); /* Did we succeed? */ if (KdStatus == KDP_PACKET_RECEIVED) CurrentPacketId &= ~SYNC_PACKET_ID; break; /* PACKET_TYPE_KD_DEBUG_IO is allowed to instantly timeout */ if (PacketType == PACKET_TYPE_KD_DEBUG_IO) /* No response, silently fail. */ return; if (KdStatus == KDP_PACKET_TIMEOUT) Retries--; /* Packet timed out, send it again */ KDDBGPRINT("KdSendPacket got KdStatus 0x%x\n", KdStatus); while (Retries > 0); 下面的过程就是和 KdReceivePacket 想法的过程了 在此不再赘述, 详细请参考 ReactOS 源码 5. Windbg 命令实战之条件断点为了方便调试过程中的分析, 首先把调试器使用到的一些常量罗列一下 : 数据包的包头 ( 数据包包头大小 :0x10) typedef struct _KD_PACKET ULONG PacketLeader;// 共有四种标识 USHORT PacketType;// 共有十三种包类型, 某些包类型具有共同的标示 USHORT ByteCount;// 紧随包头的数据部分的大小 ULONG PacketId;// 数据包的 ID ULONG Checksum;// 数据包的校验和 KD_PACKET, *PKD_PACKET; PacketLeader 的种类 #define BREAKIN_PACKET #define BREAKIN_PACKET_BYTE #define PACKET_LEADER #define PACKET_LEADER_BYTE #define CONTROL_PACKET_LEADER #define CONTROL_PACKET_LEADER_BYTE #define PACKET_TRAILING_BYTE 0x // 中断包 0x62 0x // 普通的功能包 0x30 0x // 控制包 0x69 0xAA

18 PacketType 的种类 #define PACKET_TYPE_UNUSED 0 #define PACKET_TYPE_KD_STATE_CHANGE32 1 #define PACKET_TYPE_KD_STATE_MANIPULATE 2 #define PACKET_TYPE_KD_DEBUG_IO 3 #define PACKET_TYPE_KD_ACKNOWLEDGE 4 #define PACKET_TYPE_KD_RESEND 5 #define PACKET_TYPE_KD_RESET 6 #define PACKET_TYPE_KD_STATE_CHANGE64 7 #define PACKET_TYPE_KD_POLL_BREAKIN 8 #define PACKET_TYPE_KD_TRACE_IO 9 #define PACKET_TYPE_KD_CONTROL_REQUEST 10 #define PACKET_TYPE_KD_FILE_IO 11 #define PACKET_TYPE_MAX 12 DBGKD_MANIPULATE_STATE64 结构的具体构成如下 : typedef struct _DBGKD_MANIPULATE_STATE64 ULONG ApiNumber; USHORT ProcessorLevel; USHORT Processor; NTSTATUS ReturnStatus; union DBGKD_READ_MEMORY64 ReadMemory; DBGKD_WRITE_MEMORY64 WriteMemory; DBGKD_GET_CONTEXT GetContext; DBGKD_SET_CONTEXT SetContext; DBGKD_WRITE_BREAKPOINT64 WriteBreakPoint; DBGKD_RESTORE_BREAKPOINT RestoreBreakPoint; DBGKD_CONTINUE Continue; DBGKD_CONTINUE2 Continue2; DBGKD_READ_WRITE_IO64 ReadWriteIo; DBGKD_READ_WRITE_IO_EXTENDED64 ReadWriteIoExtended; DBGKD_QUERY_SPECIAL_CALLS QuerySpecialCalls; DBGKD_SET_SPECIAL_CALL64 SetSpecialCall; DBGKD_SET_INTERNAL_BREAKPOINT64 SetInternalBreakpoint; DBGKD_GET_INTERNAL_BREAKPOINT64 GetInternalBreakpoint; DBGKD_GET_VERSION64 GetVersion64; DBGKD_BREAKPOINTEX BreakPointEx; DBGKD_READ_WRITE_MSR ReadWriteMsr; DBGKD_SEARCH_MEMORY SearchMemory; DBGKD_GET_SET_BUS_DATA GetSetBusData; DBGKD_FILL_MEMORY FillMemory; DBGKD_QUERY_MEMORY QueryMemory;

19 DBGKD_SWITCH_PARTITION SwitchPartition; u; DBGKD_MANIPULATE_STATE64, *PDBGKD_MANIPULATE_STATE64; 上述的这个结构体, 就是交换数据过程中所使用的结构 其中的 union 根据不同的功能 做不同的解释 Manipulate 类型, 在 KdSendWaitContinue 中用作区分不同的操作, 即结构体 DBGKD_MANIPULATE_STATE64 中的 ApiNumber #define DbgKdMinimumManipulate 0x #define DbgKdReadVirtualMemoryApi 0x #define DbgKdWriteVirtualMemoryApi 0x #define DbgKdGetContextApi 0x #define DbgKdSetContextApi 0x #define DbgKdWriteBreakPointApi 0x #define DbgKdRestoreBreakPointApi 0x #define DbgKdContinueApi 0x #define DbgKdReadControlSpaceApi 0x #define DbgKdWriteControlSpaceApi 0x #define DbgKdReadIoSpaceApi 0x #define DbgKdWriteIoSpaceApi 0x A #define DbgKdRebootApi 0x B #define DbgKdContinueApi2 0x C #define DbgKdReadPhysicalMemoryApi 0x D #define DbgKdWritePhysicalMemoryApi 0x E #define DbgKdQuerySpecialCallsApi 0x F #define DbgKdSetSpecialCallApi 0x #define DbgKdClearSpecialCallsApi 0x #define DbgKdSetInternalBreakPointApi 0x #define DbgKdGetInternalBreakPointApi 0x #define DbgKdReadIoSpaceExtendedApi 0x #define DbgKdWriteIoSpaceExtendedApi 0x #define DbgKdGetVersionApi 0x #define DbgKdWriteBreakPointExApi 0x #define DbgKdRestoreBreakPointExApi 0x #define DbgKdCauseBugCheckApi 0x #define DbgKdSwitchProcessor 0x #define DbgKdPageInApi 0x #define DbgKdReadMachineSpecificRegister 0x #define DbgKdWriteMachineSpecificRegister 0x #define OldVlm1 0x #define OldVlm2 0x #define DbgKdSearchMemoryApi 0x #define DbgKdGetBusDataApi 0x #define DbgKdSetBusDataApi 0x #define DbgKdCheckLowMemoryApi 0x

20 #define DbgKdClearAllInternalBreakpointsApi 0x A #define DbgKdFillMemoryApi 0x B #define DbgKdQueryMemoryApi 0x C #define DbgKdSwitchPartition 0x D #define DbgKdMaximumManipulate 0x E 好的, 常量介绍完毕 下面以 windbg 的调试断点来简要实验下 首先, 打开 OllyDbg,Attach 到 Windbg 上 由于要分析 windbg 对命令的处理, 自然要 首先断在 windbg 获取命令的地方 所以, 首先使用 Spy++ 或者直接从 OD 中获取输入框的句 柄值 (0x2038A), 然后在 OD 的命令行插件中对 GetWindowTextW 下条件断点 : bp GetWindowTextW [esp+4]==1ec 一定要下条件断点, 否则,OllyDbg 会不断的断在 GetWindowTextW 处 然后, 在 windbg 的 命令输入框中输入以下条件断点命令 : bp nt!ntcreatefile "j([esp+4]='xxx') '';'g'" 然后回车, 并 OllyDbg 断下 Alt+F9 返回用户空间 F7 几下来到如下地方 : BFF mov edi,edi push ebp BEC mov ebp,esp B mov eax, A E call windbg F A mov eax,dword ptr ds:[ ] C5 xor eax,ebp DC mov dword ptr ss:[ebp-24],eax B4508 mov eax,dword ptr ss:[ebp+8] C 0FB708 movzx ecx,word ptr ds:[eax] F 51 push ecx FF15 6C call dword ptr ds:[<&msvcrt.iswspace>] ; msvcrt.iswspace C404 add esp, C0 test eax,eax B 74 0B je short windbg D 8B5508 mov edx,dword ptr ss:[ebp+8] C202 add edx, mov dword ptr ss:[ebp+8],edx ^ EB E1 jmp short windbg B4508 mov eax,dword ptr ss:[ebp+8] B 8945 F4 mov dword ptr ss:[ebp-c],eax :894D F0 mov word ptr ss:[ebp-10],cx A 684C push windbg c ;.beep F 8B5508 mov edx,dword ptr ss:[ebp+8] push edx FF call dword ptr ds:[<&msvcrt._wcsicmp>] ; msvcrt._wcsicmp C408 add esp, C 85C0 test eax,eax E 752F jnz short windbg f

21 B45 F8 mov eax,dword ptr ss:[ebp-8] push eax FB74D F0 movzx ecx,word ptr ss:[ebp-10] push ecx B5508 mov edx,dword ptr ss:[ebp+8] C 52 push edx D 682C push windbg c ; windbg> %s%c%s\n E8 C9FBFFFF call windbg C410 add esp, A 682C push 12C F 68 EE push 2EE FF call dword ptr ds:[<&kernel32.beep>] ; kernel32.beep A E9 DB jmp windbg.01014e3a F 681C push windbg c ;.browse B4508 mov eax,dword ptr ss:[ebp+8] push eax FF call dword ptr ds:[<&msvcrt._wcsicmp>] ; msvcrt._wcsicmp E 83C408 add esp, C0 test eax,eax C jnz short windbg a B4D F8 mov ecx,dword ptr ss:[ebp-8] push ecx FB755 F0 movzx edx,word ptr ss:[ebp-10] D 52 push edx E 8B4508 mov eax,dword ptr ss:[ebp+8] push eax C push windbg c ; windbg> %s%c%s\n E8 84FBFFFF call windbg C 83C410 add esp, F 6A 00 push A 00 push B4D F8 mov ecx,dword ptr ss:[ebp-8] push ecx E8 34AFFFFF call windbg.0100f3d C E jmp windbg.01014e3a A push windbg ;.cls A6 8B5508 mov edx,dword ptr ss:[ebp+8] A9 52 push edx AA FF call dword ptr ds:[<&msvcrt._wcsicmp>] ; msvcrt._wcsicmp B0 83C408 add esp, B3 85C0 test eax,eax B jnz short windbg c B7 C645 EB 01 mov byte ptr ss:[ebp-15], BB 837D FC 00 cmp dword ptr ss:[ebp-4],0

22 010144BF 74 1A je short windbg db C push windbg ;/s C6 8B45 FC mov eax,dword ptr ss:[ebp-4] C9 50 push eax CA FF call dword ptr ds:[<&msvcrt._wcsicmp>]; msvcrt._wcsicmp D0 83C408 add esp, D3 85C0 test eax,eax D jnz short windbg db D7 C645 EB 00 mov byte ptr ss:[ebp-15], DB 0FB64D EB movzx ecx,byte ptr ss:[ebp-15] DF 51 push ecx E0 E8 FBFAFFFF call windbg.01013fe E5 0FB655 EB movzx edx,byte ptr ss:[ebp-15] E9 85D2 test edx,edx EB 751A jnz short windbg ED 8B45 F8 mov eax,dword ptr ss:[ebp-8] F0 50 push eax F1 0FB74D F0 movzx ecx,word ptr ss:[ebp-10] F5 51 push ecx F6 8B5508 mov edx,dword ptr ss:[ebp+8] F9 52 push edx FA 682C push windbg c ; windbg> %s%c%s\n FF E8 0CFBFFFF call windbg C410 add esp, E9 2E jmp windbg.01014e3a C 68 F push windbg f4 ;.cmdtree B4508 mov eax,dword ptr ss:[ebp+8] push eax FF call dword ptr ds:[<&msvcrt._wcsicmp>] ; msvcrt._wcsicmp B 83C408 add esp, E 85C0 test eax,eax F85 C jnz windbg ef C645 EA 00 mov byte ptr ss:[ebp-16], A 8B4D F8 mov ecx,dword ptr ss:[ebp-8] D 51 push ecx E 0FB755 F0 movzx edx,word ptr ss:[ebp-10] push edx B4508 mov eax,dword ptr ss:[ebp+8] push eax C push windbg c ; windbg> %s%c%s\n C E8 CFFAFFFF call windbg C410 add esp, D FC 00 cmp dword ptr ss:[ebp-4], F je short windbg c9

23 A 8B4D FC mov ecx,dword ptr ss:[ebp-4] D 0FB711 movzx edx,word ptr ds:[ecx] FA 2D cmp edx,2d B je short windbg B45 FC mov eax,dword ptr ss:[ebp-4] FB708 movzx ecx,word ptr ds:[eax] B 83F92F cmp ecx,2f E 7569 jnz short windbg c B55 FC mov edx,dword ptr ss:[ebp-4] FB movzx eax,word ptr ds:[edx+2] F872 cmp eax, A 755D jnz short windbg c C 8B4D FC mov ecx,dword ptr ss:[ebp-4] F 0FB75104 movzx edx,word ptr ds:[ecx+4] D2 test edx,edx je short windbg c B45 FC mov eax,dword ptr ss:[ebp-4] A 0FB movzx ecx,word ptr ds:[eax+4] E 51 push ecx F FF15 6C call dword ptr ds:[<&msvcrt.iswspace>] ; msvcrt.iswspace C404 add esp, C0 test eax,eax A 74 3D je short windbg c C C645 EA 01 mov byte ptr ss:[ebp-16], B55 FC mov edx,dword ptr ss:[ebp-4] C204 add edx, FC mov dword ptr ss:[ebp-4],edx B45 FC mov eax,dword ptr ss:[ebp-4] C 0FB708 movzx ecx,word ptr ds:[eax] F 51 push ecx A0 FF15 6C call dword ptr ds:[<&msvcrt.iswspace>] ; msvcrt.iswspace A6 83C404 add esp, A9 85C0 test eax,eax AB 74 0B je short windbg b AD 8B55 FC mov edx,dword ptr ss:[ebp-4] B0 83C202 add edx, B FC mov dword ptr ss:[ebp-4],edx B6 ^ EB E1 jmp short windbg B8 8B45 FC mov eax,dword ptr ss:[ebp-4] BB 0FB708 movzx ecx,word ptr ds:[eax] BE 85C9 test ecx,ecx C jnz short windbg c C2 C745 FC mov dword ptr ss:[ebp-4], C9 837D FC 00 cmp dword ptr ss:[ebp-4],0

24 010145CD 7509 jnz short windbg d CF 6A 01 push D1 E8 2A8E0400 call windbg.0105d D6 EB 12 jmp short windbg ea D8 8D55 E4 lea edx,dword ptr ss:[ebp-1c] DB 52 push edx DC 0FB645 EA movzx eax,byte ptr ss:[ebp-16] E0 50 push eax E1 8B4D FC mov ecx,dword ptr ss:[ebp-4] E4 51 push ecx E5 E8 36D0FFFF call windbg EA E9 4B jmp windbg.01014e3a EF 68 D push windbg d4 ;.flash_on_break F4 8B5508 mov edx,dword ptr ss:[ebp+8] F7 52 push edx 可以发现, 上面的函数就是在分析用户的输入, 并且判断是否有.beep.cmdtree.cls 等不需要和被调试系统交互的命令 继续调试, 我发现,windbg 内部的处理流程还是很复 杂的 尤其是进入到 windbg 的引擎模块后 所以, 为了简单起见, 我直接对 WriteFile 下断 点, 即可截获 windbg 写串口的数据, 对于 windbg 内部的实现, 等搞明白了再详述 OK! 下面在插件中对 WriteFile 下断 : bp WriteFile 然后,F9 运行 栈视图如下 : 查看 buffer 0x02CDE54C( 长度为 0x10) 的数据如下 : 然后继续 F9. 栈视图如下 : 查看 buffer 0x02CDE6E4( 长度为 0x38) 的数据如下 :

25 继续 F9, 栈视图如下 : 查看 buffer 0x023239CD( 长度为 0x1) 的数据如下 : 根据上述的截图发现 : 第一次调用 WriteFile 的数据长度为 16 字节, 恰好是 KD_PACKET 结构的大小 并且 buffer 中的数据很有特点 : 开始四个字节是四个 0x30, 和 PacketLeader 中的功能包相同 后面的两个字节 0002 则可能代表 PacketType 中的 PACKET_TYPE_KD_STATE_MANIPULATE 在后面的两个字节 0038 则可代表了后面数据包的长度, 第二次调用 WriteFile 的 buffer 的长度正是 0x38 据此, 可以推断第一次调用 WriteFile 是在发送一个 KD_PACKET 类型的数据包包头 第二次调用 WriteFile 则正是在发送真正的数据, 数据包的开头是 0x C 这个恰好是 Manipulate 类型中的 DbgKdQueryMemoryApi Windbg 在对目标系统的特定 API 函数下断点之前, 要首先查询封包中所需要的信息 所以第一次发包并不一定是下断的包 并且, 仔细观察包中的数据, 可以发现一个 ULONG 类型的数据 :0x C. 是不是很像一个函数地址 在 windbg 中输入命令 u nt!ntcreatefile kd> u nt!ntcreatefile nt!ntcreatefile: c 8bff mov edi,edi e 55 push ebp f 8bec mov ebp,esp c0 xor eax,eax push eax push eax push eax ff7530 push dword ptr [ebp+30h] 可见, 该数据正是 NtCreateFile 在被调试系统的内存地址 至于其他的数据, 均是 windbg 根据 DBGKD_MANIPULATE_STATE64 结构来填写的 有兴趣可以自己分析 第三个数据包大小是 1, 其数据包的内容正是标识数据结束的结束符 0xAA 这也印证了我们上面的分析 最后, 我们在 windbg 中验证一下上述的函数调用流程, 下如下的断点 : kd> bp nt!kdreceivepacket 应该算是比较低层的函数了 然后 g, 再然后 Ctrl+Break, 断下目标系统的运行, 输入命令 kn 得到 windbg 的输出 : kd> kn

26 # ChildEBP RetAddr e0bd nt!kdreceivepacket a4 nt!kdpreportexceptionstatechange+0x8a f137 nt!kdpreport+0x a0 804fb243 nt!kdptrap+0x c 804e0ada nt!kidispatchexception+0x d4 804e1208 nt!commondispatchexception+0x4d d4 804e4b26 nt!kitrap03+0xad c 804e48a2 nt!rtlpbreakwithstatusinstruction+0x c 806f3742 nt!keupdatesystemtime+0x d0 804dd0d7 hal!halprocessoridle+0x2 0a d nt!kiidleloop+0x10 这个也正好是我们上面所分析的流程结果 原打算对内核调试机制进行一个比较细致的分析的, 无奈使用 windbg 对它本身调试用的 API 下断无疑是太岁头上动土, 结果就是一次一次的 fatal System Error 暂时还没有想到好的下断的地方 至于开篇 xuetr 所发现的那个 inline hook, 应该是这样子 : 由于我们下的条件断点对于 windbg 来说是按照如下的方法来处理的 : 调用 KdpWriteBreakpoint 对被调试系统的 NtCreateFile 的函数头部写入 INT3(0xCC) 目标系统运行, 碰到 INT3 发生异常 Windbg 截获到异常的数据判断是否满足我们设定的条件, 并将结果发送给被调试系统 被调试系统根据 windbg 的结果来选择是断下还是继续运行 所以按照上述的陈述,NtCreateFile 的头部被改写成了 0xCC 所以 xuetr 认为是 Inline hook, 并且由于没有 jmp 等跳转指令 其 hook 完的地址没有发生变化 另外,KdpWriteBreakpoint 函数调用 KdpAddBreakpoint 改写函数的头部来添加断点, 具体可以参考 ReactOS 的源码, 不再赘述 6 总结第五部分的分析只是从黑盒的角度做了下简单的分析, 由于调试过程中下断位置没有选好, 导致目标系统频繁的崩溃, 暂时我还没有很好的办法 除非选用其他类型的调试器 可惜时间不允许, 所以这部分暂时如此, 待我请教完高人后再继续分析 ^_^ 我是边学边分析的, 入行没几个月, 所以错误在所难免, 如有错误或者更好的想法, 欢迎交流, 共同进步 转载保持完整即可

DbgPrint 函数流程分析

DbgPrint 函数流程分析 DbgPrint 函数流程分析 by 小喂 1 DbgPrint 函数流程分析 前言 Windows 下编写内核驱动时经常用到 DbgPrint 函数输出一些调试信息, 用来辅助调试 当正在用 WinDbg 内核调 试时, 调试信息会输出到 WinDbg 中 或者利用一些辅助工具也能看到输出的调试信息, 比如 Sysinternals 公司的 DebugView 工具 本文分析了 Vista 系统上

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

IP505SM_manual_cn.doc

IP505SM_manual_cn.doc IP505SM 1 Introduction 1...4...4...4...5 LAN...5...5...6...6...7 LED...7...7 2...9...9...9 3...11...11...12...12...12...14...18 LAN...19 DHCP...20...21 4 PC...22...22 Windows...22 TCP/IP -...22 TCP/IP

More information

標準 BIG 中文字型碼表 A 0 9 B C D E F 一 乙 丁 七 乃 九 了 二 人 儿 入 八 几 刀 刁 力 匕 十 卜 又 三 下 丈 上 丫 丸 凡 久 么 也 乞 于 亡 兀 刃 勺 千 叉 口 土 士 夕 大 女 子 孑 孓 寸 小 尢 尸 山 川 工 己 已 巳 巾 干 廾

標準 BIG 中文字型碼表 A 0 9 B C D E F 一 乙 丁 七 乃 九 了 二 人 儿 入 八 几 刀 刁 力 匕 十 卜 又 三 下 丈 上 丫 丸 凡 久 么 也 乞 于 亡 兀 刃 勺 千 叉 口 土 士 夕 大 女 子 孑 孓 寸 小 尢 尸 山 川 工 己 已 巳 巾 干 廾 標準 BIG 中文字型碼表 A 0 9 B C D E F B C D ± E F A 0 9 B C D E F 兙 兛 兞 兝 兡 兣 嗧 瓩 糎 0 B 9 Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ C Ⅷ Ⅸ Ⅹ 〡 〢 〣 〤 〥 〦 〧 〨 〩 十 卄 卅 D B C D E F G H I J K L M N O P Q E R S T U V W X Y Z a b c d e f g F h i

More information

,768 32,767 32K JMP Jnnn (386+) LOOP CALL [Label:] JMP short/near/far address L10: jmp jmp L20: L10 L20

,768 32,767 32K JMP Jnnn (386+) LOOP CALL [Label:] JMP short/near/far address L10: jmp jmp L20: L10 L20 (Jump) (Loop) (Conditional jump) CMP CALL AND SAR/SHR TEST JMP NOT SAL/SHL Jnnn* OR RCR/ROR LOOP XOR RCL/ROL RETn * nnn, JNE JL -128 127-32,768 32,767 32K JMP Jnnn (386+) LOOP CALL [Label:] JMP short/near/far

More information

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor 1 4.1.1.1 (Load) 14 1.1 1 4.1.1.2 (Save) 14 1.1.1 1 4.1.2 (Buffer) 16 1.1.2 1 4.1.3 (Device) 16 1.1.3 1 4.1.3.1 (Select Device) 16 2 4.1.3.2 (Device Info) 16 2.1 2 4.1.3.3 (Adapter) 17 2.1.1 CD-ROM 2 4.1.4

More information

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; Memory & Pointer trio@seu.edu.cn 2.1 2.1.1 1 int *p int a 0x00C7 0x00C7 0x00C7 2.1.2 2 int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; 2.1.3 1. 2. 3. 3 int A,

More information

1 2 / 3 1 A (2-1) (2-2) A4 6 A4 7 A4 8 A4 9 A ( () 4 A4, A4 7 ) 1 (2-1) (2-2) ()

1 2 / 3 1 A (2-1) (2-2) A4 6 A4 7 A4 8 A4 9 A ( () 4 A4, A4 7 ) 1 (2-1) (2-2) () (39mm E-Mail ( )( ), : : 1 1 ( ) 2 2 ( ) 29mm) WSK ( 1 2 / 3 1 A4 2 1 3 (2-1) 2-1 4 (2-2) 2-2 5 A4 6 A4 7 A4 8 A4 9 A4 10 11 ( () 4 A4, 5 6 7 8 A4 7 ) 1 (2-1) (2-2) () 1 2 (2-1) 3 (2-2) 4 5 6 7 (8 ) 9

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

4 / ( / / 5 / / ( / 6 ( / / 7 1 2 / 3 ( 4 ( 2003 8 ( 2

4 / ( / / 5 / / ( / 6 ( / / 7 1 2 / 3 ( 4 ( 2003 8 ( 2 : / ( 6 (2003 8 : ( 1 ( ( / / (,, ( ( - ( - (39mm 29mm 2 ( 1 2 3-6 3 6-24 6-48 12-24 8-12 WSK / WSK WSK 1 4 / ( / / 5 / / ( / 6 ( / / 7 1 2 / 3 ( 4 ( 2003 8 ( 2 9 5 ( 10 3 11 / (600 4 5 AA 710 AB 720 730

More information

民 國 105 年 大 專 程 度 義 務 役 預 備 軍 官 預 備 士 官 考 選 簡 章 目 錄 壹 考 選 依 據 1 貳 考 ( 甄 ) 選 對 象 1 參 資 格 規 定 1 肆 員 額 及 專 長 類 別 2 伍 報 名 及 選 填 志 願 日 期 方 式 3 陸 選 填 官 科 (

民 國 105 年 大 專 程 度 義 務 役 預 備 軍 官 預 備 士 官 考 選 簡 章 目 錄 壹 考 選 依 據 1 貳 考 ( 甄 ) 選 對 象 1 參 資 格 規 定 1 肆 員 額 及 專 長 類 別 2 伍 報 名 及 選 填 志 願 日 期 方 式 3 陸 選 填 官 科 ( 民 國 105 年 大 專 程 度 義 務 役 預 備 軍 官 預 備 士 官 考 選 期 程 表 日 期 執 行 項 目 3 月 1 日 (8 時 起 ) 至 3 月 21 日 (17 時 止 ) 網 路 報 名 並 完 成 列 印 3 月 22 日 (17 時 止 ) 各 校 承 辦 人 員 收 報 名 件 截 止 3 月 30 日 4 月 11 日 5 月 18 日 5 月 27 日 (17

More information

Go构建日请求千亿微服务最佳实践的副本

Go构建日请求千亿微服务最佳实践的副本 Go 构建 请求千亿级微服务实践 项超 100+ 700 万 3000 亿 Goroutine & Channel Goroutine Channel Goroutine func gen() chan int { out := make(chan int) go func(){ for i:=0; i

More information

SIK) 者, 需 實 施 1 年 以 上, 經 體 格 檢 查 無 後 遺 症 者 5. 身 體 任 何 部 分 有 刺 青 紋 身 穿 耳 洞 者, 不 得 報 考, 各 項 檢 查 結 果 須 符 合 體 位 區 分 標 準 常 備 役 體 位 二 在 校 軍 訓 成 績 總 平 均 70 分

SIK) 者, 需 實 施 1 年 以 上, 經 體 格 檢 查 無 後 遺 症 者 5. 身 體 任 何 部 分 有 刺 青 紋 身 穿 耳 洞 者, 不 得 報 考, 各 項 檢 查 結 果 須 符 合 體 位 區 分 標 準 常 備 役 體 位 二 在 校 軍 訓 成 績 總 平 均 70 分 民 國 102 年 大 專 程 度 義 務 役 預 備 軍 官 預 備 士 官 考 選 簡 章 壹 依 據 : 依 民 國 102 年 大 專 程 度 義 務 役 預 備 軍 官 預 備 士 官 考 選 計 畫 辦 理 貳 考 ( 甄 ) 選 對 象 : 具 中 華 民 國 國 籍, 尚 未 履 行 兵 役 義 務 之 役 男, 年 齡 在 32 歲 ( 民 國 70 年 1 月 1 日 以 後 出

More information

穨control.PDF

穨control.PDF TCP congestion control yhmiu Outline Congestion control algorithms Purpose of RFC2581 Purpose of RFC2582 TCP SS-DR 1998 TCP Extensions RFC1072 1988 SACK RFC2018 1996 FACK 1996 Rate-Halving 1997 OldTahoe

More information

Bus Hound 5

Bus Hound 5 Bus Hound 5.0 ( 1.0) 21IC 2007 7 BusHound perisoft PC hound Bus Hound 6.0 5.0 5.0 Bus Hound, IDE SCSI USB 1394 DVD Windows9X,WindowsMe,NT4.0,2000,2003,XP XP IRP Html ZIP SCSI sense USB Bus Hound 1 Bus

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

bingdian001.com

bingdian001.com TSM12M TSM12 STM8L152C6, STM8L152R8 MSP430F5325 whym1987@126.com! /******************************************************************************* * : TSM12.c * : * : 2013/10/21 * : TSM12, STM8L f(sysclk)

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

50~56 I1. 1 A 2 3 I2. I2a. 1 2 3 4 5 ( ) I2b. 1 2 3 I2b1. 4 5 ( ) I3. 11 12 02 ( ) 1 2 (24 ) A1. 0 1 A2 A1a. ( ) A2. ( ) () () ( ) ------------------------------------------------------------------------------------------

More information

untitled

untitled 2016 148 1 8 7 08:00 16:00 http://zj.sceea.cn www.sceea.cn APP 1 2 2 6 6 2016 2016 8 6 3 2016 2016 2016 0366 1 03 1 0391 2 54 ( ) 2 1256 7 02 1 03 1 07 2 18 2 21 1 1314 1 36 1 14000 / 20 1316 7 00 1 09

More information

Microsoft PowerPoint - os_4.ppt

Microsoft PowerPoint - os_4.ppt 行 程 資 科 系 林 偉 川 行 程 概 念 行 程 與 程 式 主 要 的 不 同 點 : 程 式 是 被 放 在 外 部 的 儲 存 裝 置 如 磁 碟 上, 而 行 程 則 被 放 在 記 憶 體 中 程 式 在 儲 存 裝 置 中 是 靜 態 的, 而 行 程 在 記 憶 體 中 是 動 態 的, 它 會 隨 著 一 些 事 件 的 發 生 而 產 生 相 對 的 改 變 行 程, 就 是

More information

恶意代码分析技术及相关工具 郑辉 清华大学网络中心 CERNET Computer Emergency Response Team

恶意代码分析技术及相关工具 郑辉 清华大学网络中心 CERNET Computer Emergency Response Team 恶意代码分析技术及相关工具 郑辉 清华大学网络中心 CERNET Computer Emergency Response Team zhenghui@ccert.edu.cn 主要内容 分析环境准备 代码分析 静态代码分析 动态调试分析 行为特征分析 主机信息获取 网络信息获取 by spark 2 分析环境准备 硬件环境准备 内存 软件环境准备 虚拟机 单机防火墙 by spark 4 VMWare

More information

2

2 2 !iisamplegetlist!iisamplegetdata:!iisamplegetlast!iisampleeraseall!iihostfilegetdata Vangkroken 2 NO-1351 Rud Norway 3 example.log IMM>captureline!15HostFileGetData

More information

ebook140-8

ebook140-8 8 Microsoft VPN Windows NT 4 V P N Windows 98 Client 7 Vintage Air V P N 7 Wi n d o w s NT V P N 7 VPN ( ) 7 Novell NetWare VPN 8.1 PPTP NT4 VPN Q 154091 M i c r o s o f t Windows NT RAS [ ] Windows NT4

More information

06721 main() lock pick proc() restart() [2][4] MINIX minix2.0 GDT, IDT irq table[] CPU CPU CPU CPU (IDTR) idt[] CPU _hwint00:! Interrupt

06721 main() lock pick proc() restart() [2][4] MINIX minix2.0 GDT, IDT irq table[] CPU CPU CPU CPU (IDTR) idt[] CPU _hwint00:! Interrupt MINIX ( 730000) ( 730000) MINIX MINIX2.0 MINIX : MINIX TP3 1 MINIX UNIX Tanenbaum UNIX MINIX LINUX MINIX MINIX MINIX1.0 UNIX V7 MINIX2.0[3] POSIX MINIX3 MINIX Gabriel A. Wainer 1994-1995 [5] 1998 I/O 2002

More information

an153f

an153f 153 2016 1 Linduino Michael Jones (PSM) LTpowerPlay (BMC) PSM PSM PMBus PMBus SMBus SMBus I2C PSM BMC Linduino (API) PSM Linduino PSM BMC BMC Robust PMBus System Software for the LTC3880) I 2 C / SMBus

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

Simulator By SunLingxi 2003

Simulator By SunLingxi 2003 Simulator By SunLingxi sunlingxi@sina.com 2003 windows 2000 Tornado ping ping 1. Tornado Full Simulator...3 2....3 3. ping...6 4. Tornado Simulator BSP...6 5. VxWorks simpc...7 6. simulator...7 7. simulator

More information

!!""# $ %#" & $$ % $()! *% $!*% +,-. / 0 %%"#" 0 $%1 0 * $! $#)2 "

!!# $ %# & $$ % $()! *% $!*% +,-. / 0 %%# 0 $%1 0 * $! $#)2 ! """"""""""""""""""" " !!""# $ %#" & $$ % $()! *% $!*% +,-. / 0 %%"#" 0 $%1 0 * $! $#)2 " !"#$%#$&!!!!!!!!!!!!!!!!!!!!!!!!!!!"#$%& (& #) *+&,"-./%0 1 2"0*-"3* #4 5%&6&4"&00 78 9+& :"/;& 7< 9+& =#4-%%/

More information

1

1 1 2 3 4 5 GNUDebugger 6 7 void main(int argc, char **argv){ vulncpy(argv[1]); return; } void vulncpy(char *a){ char buf[30]; strcpy(buf, a); return; } *argv[1] buf Shellcode *argv[1]... &buf &buf 8 strcpy

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

Microsoft Word - MSP430 Launchpad 指导书.docx

Microsoft Word - MSP430 Launchpad 指导书.docx Contents 3... 9... 14 MSP430 LAUNCHPAD 指导书 3 第一部分第一个工程 New Project File > New > CCS Project Project name: ButtonLED Device>Family: MSP430 Variant: MSP430G2553 Project templates and examples : Empty Project

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

<4D6963726F736F667420576F7264202D20C7B6C8EBCABDCFB5CDB3C9E8BCC6CAA6B0B8C0FDB5BCD1A75FD1F9D5C22E646F63>

<4D6963726F736F667420576F7264202D20C7B6C8EBCABDCFB5CDB3C9E8BCC6CAA6B0B8C0FDB5BCD1A75FD1F9D5C22E646F63> 因 为 路 过 你 的 路, 因 为 苦 过 你 的 苦, 所 以 快 乐 着 你 的 快 乐, 追 逐 着 你 的 追 逐 内 容 简 介 本 书 根 据 2005 年 下 半 年 实 施 的 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 嵌 入 式 系 统 设 计 师 级 考 试 大 纲 精 神, 在 深 入 研 究 历 年 计 算 机 技 术 与 软

More information

ebook140-9

ebook140-9 9 VPN VPN Novell BorderManager Windows NT PPTP V P N L A V P N V N P I n t e r n e t V P N 9.1 V P N Windows 98 Windows PPTP VPN Novell BorderManager T M I P s e c Wi n d o w s I n t e r n e t I S P I

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

1.ai

1.ai HDMI camera ARTRAY CO,. LTD Introduction Thank you for purchasing the ARTCAM HDMI camera series. This manual shows the direction how to use the viewer software. Please refer other instructions or contact

More information

untitled

untitled 2015 138 8 13 8:00 14:00 http://zj.sceea.cn 1 www.sceea.cn APP 1 2 6 6 2 2015 2015 8 13 3 1156 2 12 1 16 1 1160 4 21 4 1161 4 06 4 1162 1 01 1 1168 1 19 1 1169 2 07 2 1254 4 00 4 1261 1 88 1 1262 7 4 00

More information

AL-M200 Series

AL-M200 Series NPD4754-00 TC ( ) Windows 7 1. [Start ( )] [Control Panel ()] [Network and Internet ( )] 2. [Network and Sharing Center ( )] 3. [Change adapter settings ( )] 4. 3 Windows XP 1. [Start ( )] [Control Panel

More information

> u eip l 3 002f2aa9 90 nop 002f2aaa 90 nop >!chkimg -d -lo 1 ping // 检查文件是否被篡改? 002f2aa7-002f2aaa 4 bytes - ping!maincrtstartup [ e :f0 cc 9

> u eip l 3 002f2aa9 90 nop 002f2aaa 90 nop >!chkimg -d -lo 1 ping // 检查文件是否被篡改? 002f2aa7-002f2aaa 4 bytes - ping!maincrtstartup [ e :f0 cc 9 在 WINDBG 中定位 ExceptionAddress 核心技术部陈庆 关键字 : 调试异常 windbg second chance ExceptionAddress 摘要 : 在 windbg 中调试时, 碰上 second chance 时, 栈回溯已经看不到与 ExceptionAddress 直接相关的信息, 但我们调试的目的就是要找到 ExceptionAddress 本文介绍了几种通用思路来解决这个问题

More information

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha CYPOK CYPOK 1 UltraEdit Project-->Install Language Tool: Language Suite----->hi-tech picc Tool Name ---->PICC Compiler Executable ---->c:hi-picinpicc.exe ( Command-line Project-->New Project-->File Name--->myc

More information

(2) Function 0BH: Function 0CH: (pixel, picture element) Function 0DH: Function 0FH: Function 13H:

(2) Function 0BH: Function 0CH: (pixel, picture element) Function 0DH: Function 0FH: Function 13H: (1) INT 10H Function 00H: Function 01H: Function 02H: Function 03H: Function 05H: Function 06H: Function 07H: Function 08H: Function 09H: Function 0AH: (2) Function 0BH: Function 0CH: (pixel, picture element)

More information

untitled

untitled 2016 160 8 14 8:00 14:00 1 http://zj.sceea.cn www.sceea.cn APP 1 190 180 2 2 6 6 8 15 2016 2016 8 13 3 2016 2016 2016 0382 2 06 1 3300 14 1 3300 0451 5 01 2 7500 02 2 7500 05 ( ) 1 7500 1156 4 15 2 15000

More information

Visualize CMap

Visualize CMap 0001 0020 0002 0021 0003 0022 0004 0023 0005 0024 0006 0025 0007 0026 0008 0027 0009 0028 000A 0029 000B 002A 000C 002B 000D 002C 000E 002D 000F 002E 0010 002F 0011 0030 0012 0031 0013 0032 0014 0033 0015

More information

ARM JTAG实时仿真器安装使用指南

ARM JTAG实时仿真器安装使用指南 ARM JTAG Version 1.31 2003. 11. 12 ARM JTAG ARM JTAG.3 ARM 2.1.4 2.2.4 ARM JTAG 3.1 18 3.2 18 3.2.1 Multi-ICE Server.18 3.2.2 ADS..21 ARM JTAG 4.1 Multi-ICE Server 33 4.1.1 Multi-ICE Server..... 33 4.1.2

More information

学习MSP430单片机推荐参考书

学习MSP430单片机推荐参考书 MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP

More information

Microsoft PowerPoint - ds-1.ppt [兼容模式]

Microsoft PowerPoint - ds-1.ppt [兼容模式] http://jwc..edu.cn/jxgl/ HomePage/Default.asp 2 说 明 总 学 时 : 72( 学 时 )= 56( 课 时 )+ 16( 实 验 ) 行 课 时 间 : 第 1 ~14 周 周 学 时 : 平 均 每 周 4 学 时 上 机 安 排 待 定 考 试 时 间 : 课 程 束 第 8 11 12 章 的 内 容 为 自 学 内 容 ; 目 录 中 标 有

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile.. WebSphere Studio Application Developer IBM Portal Toolkit... 1/21 WebSphere Studio Application Developer IBM Portal Toolkit Portlet Doug Phillips (dougep@us.ibm.com),, IBM Developer Technical Support Center

More information

Microsoft Word - 小心翼翼的二十一點N.doc

Microsoft Word - 小心翼翼的二十一點N.doc 投 稿 類 別 : 資 訊 類 篇 名 : 小 心 翼 翼 的 二 十 一 點 作 者 : 陳 鈺 文 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 李 伯 謙 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 胡 家 媛 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 指 導 老 師 : 周 曉 玲 老 師 陳 思 亮 主 任 壹 前 言 一 研 究 動 機 平

More information

!""# $!""%!"&" #

!# $!%!& # !""# $!""%!"&" # !""# +!""(!""#!""$!""$ %"" &!""$ &( ) %# )"# )!!""#!""$!""#!""$ )*"!! !"#" $ % !" #$$%! #" #$$%& " #$$(!% %" #$$(#! (" #$$)#& )" #$$) # *" #$$)%$ &" #$$)%% +" #$$)%&!$" #$$)(#!" #$$%(&

More information

97 04 25 0970002232 97 12 31 1-7 1 2 1 0 1 0 1 0 1 0 1 0 1 0 1 2 24 A1. 0 1 ( 6 ) 2 ( 6 ) 3 4 A1a.? 5 6 0 1 A1b.? 0 1 2 A2. 0 1 A2b. A2c. A2a. A2d. 1 A3. 1 A4 2 0 A4 A3a.?? 0 A4 1 A3b. 0 A4 1 A3c.?? 1

More information

ebook

ebook 3 3 3.1 3.1.1 ( ) 90 3 1966 B e r n s t e i n P ( i ) R ( i ) W ( i P ( i P ( j ) 1) R( i) W( j)=φ 2) W( i) R( j)=φ 3) W( i) W( j)=φ 3.1.2 ( p r o c e s s ) 91 Wi n d o w s Process Control Bl o c k P C

More information

S7-1200 可编程控制器

S7-1200 可编程控制器 www.plcworld.cn 前 言 SIMATIC S7 系 统 手 册 产 品 概 述 1 安 装 2 PLC 概 念 3 设 备 配 置 4 编 程 概 念 5 编 写 指 令 6 PROFINET 7 点 对 点 (PtP) 通 信 8 在 线 和 诊 断 工 具 9 A 技 术 规 范 B 计 算 功 率 预 算 C 订 货 号 11/2009 A5E02486685-02 法 律 资

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

untitled

untitled 2015 141 8 14 8:00 12:00 1 http://zj.sceea.cn www.sceea.cn APP 9 1 2 2 6 6 2015 2015 8 14 3 1156 1 16 1 1160 1 21 1 1162 1 01 1 1264 2 06 2 1275 1 04 1 1357 5 03 2 15 2 29 1 1358 9 07 2 14 2 15 2 4 16

More information

Guide to Install SATA Hard Disks

Guide to Install SATA Hard Disks SATA RAID 1. SATA. 2 1.1 SATA. 2 1.2 SATA 2 2. RAID (RAID 0 / RAID 1 / JBOD).. 4 2.1 RAID. 4 2.2 RAID 5 2.3 RAID 0 6 2.4 RAID 1.. 10 2.5 JBOD.. 16 3. Windows 2000 / Windows XP 20 1. SATA 1.1 SATA Serial

More information

目录

目录 ALTERA_CPLD... 3 11SY_03091... 3 12SY_03091...4....5 21 5 22...8 23..10 24..12 25..13..17 3 1EPM7128SLC.......17 3 2EPM7032SLC.......18 33HT46R47......19..20 41..20 42. 43..26..27 5151DEMO I/O...27 52A/D89C51...28

More information

Abstract arm linux tool-chain root NET-Start! 2

Abstract arm linux tool-chain root NET-Start! 2 Lab III - Embedding Linux 1 Abstract arm linux tool-chain root NET-Start! 2 Part 1.4 Step1. tool-chain 4 Step2. PATH 4 Part 2 kernel 5 Step1. 5 Step2... 6 Step3...8 Part 3 root. 8 Step1. 8 Step2. 8 Part

More information

今天刚发现的, 比较简单, 于是就来简单分析下吧 该感染样本很简单, 新加了个区段放病毒执行代码, 执行病毒代码, 最后跳回原入口点来执行原文件 下面就是感染后的代码的简单分析 : ; =============== S U B R O U T I N E =====================

今天刚发现的, 比较简单, 于是就来简单分析下吧 该感染样本很简单, 新加了个区段放病毒执行代码, 执行病毒代码, 最后跳回原入口点来执行原文件 下面就是感染后的代码的简单分析 : ; =============== S U B R O U T I N E ===================== 吾爱破解论坛 [LCG] [LSG] 立足软件安全和病毒分析最前端, 丰富的技术版块交相辉映, 由无数加密解密及反病毒爱好者共同维护, 留给世界一抹值得百年回眸的惊 艳, 沉淀百年来计算机应用之精华与优雅, 信息线条与生活质感淡定交融, 任岁月流转, 低调而奢华的技术交流与研究却是亘古不变 标题 : 一个感染样本的简单分析 作者 :ximo 今天刚发现的, 比较简单, 于是就来简单分析下吧 该感染样本很简单,

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

Linux kernel exploit研究和探索

Linux kernel exploit研究和探索 Linux kernel exploit DOC alert7 PPT e4gle 2002-12-2 1 2002-12-2 2 Linux kernel exploit kernel exploit exploit exploit exploit (Kernel Buffer Overflow) (Kernel

More information

漏 洞 攻 防 EXPLOIT ATTACK & DEFENCE 栏 目 编 辑 脚 本 小 子 scriptsboy@hacker.com.cn HEAD 部 分 大 小 当 然 也 就 是 固 定 的 18200H 如 果 要 提 取 出 HEAD, 我 们 可 以 选 中 前 18200H 字

漏 洞 攻 防 EXPLOIT ATTACK & DEFENCE 栏 目 编 辑 脚 本 小 子 scriptsboy@hacker.com.cn HEAD 部 分 大 小 当 然 也 就 是 固 定 的 18200H 如 果 要 提 取 出 HEAD, 我 们 可 以 选 中 前 18200H 字 适 合 读 者 : 入 侵 爱 好 者 溢 出 爱 好 者 前 置 知 识 : 汇 编 语 言 缓 冲 区 溢 出 基 本 原 理 文 / 图 何 永 强 Word 畸 形 数 据 结 构 溢 出 漏 洞 分 析 与 利 用 以 前 都 是 写 远 程 溢 出 漏 洞, 感 觉 也 该 换 换 口 味 了 事 实 上,2005 年 以 来 的 远 程 溢 出 漏 洞, 如 MS05-039 MS06-040

More information

WCA Regulations and Guidelines

WCA Regulations and Guidelines WCA Regulations and Guidelines WCA Regulations Committee WCA 競 賽 規 則 2015 版 本 :2015 年 7 月 1 日 [wca-regulations-translations:c77f738] 註 釋 繁 體 中 文 翻 譯 本 翻 譯 版 本 完 全 依 照 官 方 版 本 翻 譯, 但 難 免 有 不 精 確 的 地 方,

More information

TC35短信发送程序设计

TC35短信发送程序设计 http://www.dragonsoft.net.cn/down/project/tc35_sms.rar TC35 AT /down/book/tc35_at.pdf TC35/TC35i GSM Modem TC35 GSM POS COM SIM DOWN COM E, vbcr AT VB6.0 1)C# http://www.yesky.com/softchannel/72342380468109312/20040523/1800310.shtml,

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

untitled

untitled 2006 6 Geoframe Geoframe 4.0.3 Geoframe 1.2 1 Project Manager Project Management Create a new project Create a new project ( ) OK storage setting OK (Create charisma project extension) NO OK 2 Edit project

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南 Symantec Sygate Enterprise Protection 防 护 代 理 安 装 使 用 指 南 5.1 版 版 权 信 息 Copyright 2005 Symantec Corporation. 2005 年 Symantec Corporation 版 权 所 有 All rights reserved. 保 留 所 有 权 利 Symantec Symantec 徽 标 Sygate

More information

EC51/52 GSM /GPRS MODEN

EC51/52 GSM /GPRS MODEN EC51/52 GSM /GPRS MODEN AT SMS aoe EC66.com 2004.11 ... 2 1 GSM AT... 3 2 EC51... 4 3 PDU... 4 4 PDU... 5 5... 7 6 TEXT... 8 7... 9 8.... 9 9.... 9 http://www.ec66.com/ 1 AT GPRS Modem SMS AT EC51 EC52

More information

2 12

2 12 SHENZHEN BRILLIANT CRYSTAL TECHNOLOGIC CO.,LTD. The specification for the following models Graphic LCM serial communication control board CB001 PROPOSED BY APPROVED Design Approved TEL:+86-755-29995238

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

Chapter 2

Chapter 2 2 (Setup) ETAP PowerStation ETAP ETAP PowerStation PowerStation PowerPlot ODBC SQL Server Oracle SQL Server Oracle Windows SQL Server Oracle PowerStation PowerStation PowerStation PowerStation ETAP PowerStation

More information

94/03/25 (94 0940002083 94 12 31 B 1-8 (12-64 29 5 16 82 5 15 1 2 22-24 29 25-28 k1. 1 A 2 k2k3 3 k2k3 k2. k2a. 1 2 3 4 k2b. 1 2 k2b1.? 3 k3. 11 12 02 ( ( ( 1 2 (24 A. A1.? 1 0 A1a.? 1. 1 2 2. A2. 1 2

More information

( ) Wuhan University

( ) Wuhan University Email: huangzh@whueducn, 47 Wuhan Univesity i L A TEX,, : http://affwhueducn/huangzh/ 8 4 49 7 ii : : 4 ; 8 a b c ; a b c 4 4 8 a b c b c a ; c a b x y x + y y x + y x x + y x y 4 + + 8 8 4 4 + 8 + 6 4

More information

#FT66/68CN(01~07)

#FT66/68CN(01~07) : KX-FT66CN KX-FT68CN KX-FT66 Panasonic Panasonic ( ) KX-FT66 KX-FT68 : CN KX-FT66 : ( KME ) KME Kyushu Matsushita Electric Co., Ltd. 2000 2000 2 E. F. 1. 14. ( 2. ) 3. 15. 4. 5. / 6. 1. 2. 7. 3. 4. 8.

More information

INTRODUCTION TO COM.DOC

INTRODUCTION TO COM.DOC How About COM & ActiveX Control With Visual C++ 6.0 Author: Curtis CHOU mahler@ms16.hinet.net This document can be freely release and distribute without modify. ACTIVEX CONTROLS... 3 ACTIVEX... 3 MFC ACTIVEX

More information

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc

TwinCAT 1. TwinCAT TwinCAT PLC PLC IEC TwinCAT TwinCAT Masc TwinCAT 2001.12.11 TwinCAT 1. TwinCAT... 3 2.... 4... 4...11 3. TwinCAT PLC... 13... 13 PLC IEC 61131-3... 14 4. TwinCAT... 17... 17 5. TwinCAT... 18... 18 6.... 19 Maschine.pro... 19... 27 7.... 31...

More information

DR2010.doc

DR2010.doc DR/2010 HACH 11-8-96-2 HACH. DR/2010, / UL E79852 CSA C22.223 LR 58275 VDE GS 1015-92 FCC"A" 15 : AMADOR CORP, HACH. EN50 011/CISPR 11 "B" (EMI)/89/336/EEC/EMC: AMADOR CORP, HACH.. EN50 082-1( )/89/226/EEC

More information

TX-NR3030_BAS_Cs_ indd

TX-NR3030_BAS_Cs_ indd TX-NR3030 http://www.onkyo.com/manual/txnr3030/adv/cs.html Cs 1 2 3 Speaker Cable 2 HDMI OUT HDMI IN HDMI OUT HDMI OUT HDMI OUT HDMI OUT 1 DIGITAL OPTICAL OUT AUDIO OUT TV 3 1 5 4 6 1 2 3 3 2 2 4 3 2 5

More information

User’s Manual

User’s Manual V7 用 户 手 册 亿 图 为 您 专 业 图 表 设 计 提 供 最 佳 解 决 方 案 2004-2014 EdrawSoft. All right reserved. Edraw and Edraw logo are registered trademarks of EdrawSoft. 目 录 亿 图 怎 样 优 越 于 其 他 软 件... 5 亿 图 7 个 新 功 能... 6 为

More information

第一章 概论

第一章  概论 1 2 3 4 5 6 7 8 Linux 7.1 7.1.1 1 1 2 3 2 3 1 2 3 3 1 2 3 7.1.2 1 2 1 2 3 4 5 7.1.3 1 1 2 3 2 7.1 3 7.1.4 1 1 PCB 2 3 2 PCB PCB PCB PCB PCB 4 1 2 PSW 3 CPU CPU 4 PCB PCB CPU PCB PCB PCB PCB PCB PCB PCB

More information

(Microsoft Word - PK254P\262\331\327\366\312\326\262\341.doc)

(Microsoft Word - PK254P\262\331\327\366\312\326\262\341.doc) PROKIN 3.0 软 件 操 作 手 册 TecnoBody S.r.l. Published: Luglio 2006 Code-Version: 1 目 录 第 一 节... 7 介 绍... 7 手 册 中 使 用 的 安 全 标 志 和 符 号... 8 概 述... 10 安 全 规 则... 11 PROKIN 系 统 安 装... 11 系 统 组 成... 13 系 统 安 装

More information

:;< =;< >!?%(, (-+ *$5(1 *$%* *#%0$#34 65&# *--.20$ $-.#+-317 A$#, 4%, 5* 54! >! B-3 0$5)/3#( * %* $-.# 5( *$#53 B3## *5.#7

:;< =;< >!?%(, (-+ *$5(1 *$%* *#%0$#34 65&# *--.20$ $-.#+-317 A$#, 4%, 5* 54! >! B-3 0$5)/3#( * %* $-.# 5( *$#53 B3## *5.#7 ! # $# %& () *%& +,+-,.. /&,.. /& 0(%+ 1)&)+,..- 02),3/&1 4%+0) 0 /.. %& () % ()+ (,&5 /& *%&*.60/%&,0, *%&0)7 86)&*) 9# # : : : : : : : : $;;< =%>) 0(%22/&1 ).)?/0/%& &) 4%+30 (,?) @)*%>),! 9A! 4,- B%+

More information

1 CPU interrupt INT trap CPU exception

1 CPU interrupt INT trap CPU exception 1 CPU interrupt INT trap CPU exception 2 X86 CPU gate 64 16 1 2 5 8 16 16 P DPL 00101 TSS 101 DPL P 1 64 16 1 2 1 1 3 3 5 16 16 16 P DPL 0 D 000 16 110 111 100 D 1=32 0=16 DPL P 1 INT DPL1>=CPL>=DPL CPU

More information

ICD ICD ICD ICD ICD

ICD ICD ICD ICD ICD MPLAB ICD2 MPLAB ICD2 PIC MPLAB-IDE V6.0 ICD2 usb PC RS232 MPLAB IDE PC PC 2.0 5.5V LED EEDATA MPLAB ICD2 Microchip MPLAB-IDE v6.0 Windows 95/98 Windows NT Windows 2000 www.elc-mcu.com 1 ICD2...4 1.1 ICD2...4

More information

目 录

目 录 1 Quick51...1 1.1 SmartSOPC Quick51...1 1.2 Quick51...1 1.3 Quick51...2 2 Keil C51 Quick51...4 2.1 Keil C51...4 2.2 Keil C51...4 2.3 1 Keil C51...4 2.4 Flash Magic...9 2.5 ISP...9 2.6...10 2.7 Keil C51...12

More information

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f 27 1 Vol.27 No.1 CEMENTED CARBIDE 2010 2 Feb.2010!"!!!!"!!!!"!" doi:10.3969/j.issn.1003-7292.2010.01.011 OPC 1 1 2 1 (1., 412008; 2., 518052), OPC, WinCC VB,,, OPC ; ;VB ;WinCC Application of OPC Technology

More information

E170C2.PDF

E170C2.PDF IQ E170C2 2002.3. Rotork Rotork * ( ) * * RotorkIQ - IQ * * PC IQ Insight / Rotork * - Rotork IQ www.rotork.com 5 10 5.1 11 1 2 5.2 11 2 3 5.3 11 3 IQ 3 5.4 11 3.1 3 5.5 IQM12 3.2 3 5.6 IQML12 3.3 4 5.7

More information

42 2141601026 2016 11 27 2 1.1............................................. 2 1.2....................................... 2 1.2.1......................................... 2 1.3.............................................

More information

PowerPoint 演示文稿

PowerPoint 演示文稿 Hadoop 生 态 技 术 在 阿 里 全 网 商 品 搜 索 实 战 阿 里 巴 巴 - 王 峰 自 我 介 绍 真 名 : 王 峰 淘 宝 花 名 : 莫 问 微 博 : 淘 莫 问 2006 年 硕 士 毕 业 后 加 入 阿 里 巴 巴 集 团 淘 及 搜 索 事 业 部 ( 高 级 技 术 与 家 ) 目 前 负 责 搜 索 离 线 系 统 团 队 技 术 方 向 : 分 布 式 计 算

More information

Microsoft Word - Front cover_white.doc

Microsoft Word - Front cover_white.doc Real Time Programme 行 情 报 价 程 序 Seamico Securities Public Company Limited WWW.SEAMICO.COM Table of Content 目 录 开 始 使 用 开 始 使 用 Z Net 程 序 程 序 1 股 票 观 察 者 4 每 日 股 票 按 时 间 的 交 易 查 询 10 多 股 同 列 13 股 票 行 情

More information

<4D F736F F D20CBABC1FA DA3A8BAACB6C1D0B44D31A3A9C4A3BFE9D7CAC1CF B0E62E646F63>

<4D F736F F D20CBABC1FA DA3A8BAACB6C1D0B44D31A3A9C4A3BFE9D7CAC1CF B0E62E646F63> SL-1356MOD-SU 射 频 卡 读 写 模 块 使 用 说 明 一. 概 述 双 龙 公 司 针 对 支 付 系 统 公 共 交 通 门 禁 锁 具 设 备 管 理 二 代 身 份 证 等 行 业 推 出 SL-1356MOD-SU 射 频 卡 读 写 模 块 该 模 块 全 面 支 持 ISO14443 A/B -1-2 -3-4 标 准, 适 用 于 读 写 各 种 符 合 ISO14443

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

專業式報告

專業式報告 IP POWER 9258 IP POWER 9258 說 : V1.38 : 2006. 08-1 - VER. X.X, FCC CE 1. IP POWER 9258. 2. 9258 3. 9258-2 - 1....4... 9258... 2....5...... 3....6 4....7...... 5....8... PC / SERVER.. 6. IE... 11 9258...

More information

Ps22Pdf

Ps22Pdf A A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D B C D F G I J A A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D A B C D

More information

SP5 user guide.PDF

SP5 user guide.PDF -- 2277 6677 futures@phillip.com.hk PHILLIP COMMODITIES (HK) LTD. 2 1 3 24 2277 6677 PATS A. PATS POEMS Professional J-Trader 1. 2. 3. 4. 5. 6. 7. 8. B. (CPU) RAM (Hard disk) PIII 800 MHz 128 MB 50MB 15

More information

Microsoft Word - 11月電子報1130.doc

Microsoft Word - 11月電子報1130.doc 發 行 人 : 楊 進 成 出 刊 日 期 2008 年 12 月 1 日, 第 38 期 第 1 頁 / 共 16 頁 封 面 圖 話 來 來 來, 來 葳 格 ; 玩 玩 玩, 玩 數 學 在 11 月 17 到 21 日 這 5 天 裡 每 天 一 個 題 目, 孩 子 們 依 據 不 同 年 段, 尋 找 屬 於 自 己 的 解 答, 這 些 數 學 題 目 和 校 園 情 境 緊 緊 結

More information