|
[求助]metasploit安装不了啊~~~~~~~~~~
找个linux虚拟机,代码放上去直接运行就行了 |
|
[求助]各位朋友好,诚请你们帮我一个理解一下几句inline hook的代码,不胜感激.
我说的不一定对啊,感觉像是: 在NtOpenFile原函数开始5字节处放置一个jmp,跳到MyNtOpenFile(),MyNtOpenFile()检查一下路径,如果可过的话,就要跳到OldNtOpenFile().OldNtOpenFile()就会去调用原来的ori NtOpenFile_Addr.但原来的NtOpenFile_addr(真实openfile地址头5字节被放置了jmp)所以需要把这5字节先执行了,再跳到NtOpenFile剩余5字节以后的地方继续执行。 mov NtOpenFile_Addr,eax mov ecx,5 mov esi,eax mov edi,offset OldNtOpenFile rep movsb //这几句是保存原来NtOpenFile()的头5字节到OldNtOpenFile中去 mov edx,offset MyNtOpenFile sub edx,eax sub edx,5 //这几句在计算原函数地址到MyNtOpenFile的距离 mov byte ptr [eax],0e9h//放jmp xchg [eax+1],edx//偏移一字节开始放置需要跳的距离,(在真正的函数入口放个jmp,跳到MyNtOpenFile) |
|
[下载]本人收藏的电子书od入门,汇编指令帮助,飘云阁基础破解教程
不懂啊。。哎。。学习一下 |
|
新手求教编码问题
ASCII只是字符编码,你把一块内存当字符看的时候,你就用ASCII(或者其它UNICODE编码)去看待它们。 实际上,一块内存里面具体是什么值,在于你认为它是什么。内存中只是01组合,你把它当作字符,那你就用特定的编码去解读它,要是看作数字,你也得按特定的规则去读它。 某字节:0100 0001(65,A),它要当作一个字符,就是'A',要是当作数字,就是65。。。 指令一般处于可执行的段(代码段),CPU将此段数据看成指令,此段开始处第一条数据(指令)进行分析,看它需要什么样的数据,如,它发现第一条是个push EAX, 则这个指令长度就是4字节,然后从4字节以后分析下一条指令。。。就是说,指令是有其固定长度的数据的。 指令和数据存在于不同的段内。 代码段内的数据长度是根据指令分析出来的。 数据段内的数据是什么,需要看引用它的指令需要什么数据。 |
|
|
|
[原创]如何用程序判定一个PE文件是否加壳
不懂,学习一下 |
|
|
|
[求助]拦截进程启动的一点疑问
MJ大大,请问一下: 假设NtCreateProcess成功返回,但若在挂钩(MyNtcreateProcess)中向上层返回失败,此时内核中的相关结构已经建成,这些结构怎么处理啊?谢谢! |
|
[求助]NtcreateProcess HOOK 程序路径
我用windbg看了下,好像不太像。。。 |
|
|
|
[注意]《加密与解密(第三版)》额外的电子文档
支持,look look |
|
[求助]ntcreateprocess ntcreatethread
HANDLE WINAPI CreateRemoteThread ( HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) Definition at line 100 of file thread.c. Referenced by ConioConsoleCtrlEventTimeout(), and CreateThread(). 00107 { 00108 NTSTATUS Status; 00109 INITIAL_TEB InitialTeb; 00110 CONTEXT Context; 00111 CLIENT_ID ClientId; 00112 OBJECT_ATTRIBUTES LocalObjectAttributes; 00113 POBJECT_ATTRIBUTES ObjectAttributes; 00114 HANDLE hThread; 00115 ULONG Dummy; 00116 00117 DPRINT("CreateRemoteThread: hProcess: %ld dwStackSize: %ld lpStartAddress" 00118 ": %p lpParameter: %lx, dwCreationFlags: %lx\n", hProcess, 00119 dwStackSize, lpStartAddress, lpParameter, dwCreationFlags); 00120 00121 /* Clear the Context */ 00122 RtlZeroMemory(&Context, sizeof(CONTEXT)); 00123 00124 /* Write PID */ 00125 ClientId.UniqueProcess = hProcess; 00126 00127 /* Create the Stack */ 00128 Status = BasepCreateStack(hProcess, 00129 dwStackSize, 00130 dwCreationFlags & STACK_SIZE_PARAM_IS_A_RESERVATION ? 00131 dwStackSize : 0, 00132 &InitialTeb); 00133 if(!NT_SUCCESS(Status)) 00134 { 00135 SetLastErrorByStatus(Status); 00136 return NULL; 00137 } 00138 00139 /* Create Initial Context */ 00140 BasepInitializeContext(&Context, 00141 lpParameter, 00142 lpStartAddress, 00143 InitialTeb.StackBase, 00144 1); 00145 00146 /* initialize the attributes for the thread object */ 00147 ObjectAttributes = BasepConvertObjectAttributes(&LocalObjectAttributes, 00148 lpThreadAttributes, 00149 NULL); 00150 00151 /* Create the Kernel Thread Object */ 00152 Status = NtCreateThread(&hThread, 00153 THREAD_ALL_ACCESS, 00154 ObjectAttributes, 00155 hProcess, 00156 &ClientId, 00157 &Context, 00158 &InitialTeb, 00159 TRUE); 00160 if(!NT_SUCCESS(Status)) 00161 { 00162 BasepFreeStack(hProcess, &InitialTeb); 00163 SetLastErrorByStatus(Status); 00164 return NULL; 00165 } 00166 00167 /* Are we in the same process? */ 00168 if (hProcess == NtCurrentProcess()) 00169 { 00170 PTEB Teb; 00171 PVOID ActivationContextStack; 00172 THREAD_BASIC_INFORMATION ThreadBasicInfo; 00173 #ifndef SXS_SUPPORT_FIXME 00174 ACTIVATION_CONTEXT_BASIC_INFORMATION ActivationCtxInfo; 00175 ULONG_PTR Cookie; 00176 #endif 00177 ULONG retLen; 00178 00179 /* Get the TEB */ 00180 Status = NtQueryInformationThread(hThread, 00181 ThreadBasicInformation, 00182 &ThreadBasicInfo, 00183 sizeof(ThreadBasicInfo), 00184 &retLen); 00185 if (NT_SUCCESS(Status)) 00186 { 00187 /* Allocate the Activation Context Stack */ 00188 Status = RtlAllocateActivationContextStack(&ActivationContextStack); 00189 } 00190 00191 if (NT_SUCCESS(Status)) 00192 { 00193 Teb = ThreadBasicInfo.TebBaseAddress; 00194 00195 /* Save it */ 00196 Teb->ActivationContextStackPointer = ActivationContextStack; 00197 #ifndef SXS_SUPPORT_FIXME 00198 /* Query the Context */ 00199 Status = RtlQueryInformationActivationContext(1, 00200 0, 00201 NULL, 00202 ActivationContextBasicInformation, 00203 &ActivationCtxInfo, 00204 sizeof(ActivationCtxInfo), 00205 &retLen); 00206 if (NT_SUCCESS(Status)) 00207 { 00208 /* Does it need to be activated? */ 00209 if (!ActivationCtxInfo.hActCtx) 00210 { 00211 /* Activate it */ 00212 Status = RtlActivateActivationContext(1, 00213 ActivationCtxInfo.hActCtx, 00214 &Cookie); 00215 if (!NT_SUCCESS(Status)) 00216 DPRINT1("RtlActivateActivationContext failed %x\n", Status); 00217 } 00218 } 00219 else 00220 DPRINT1("RtlQueryInformationActivationContext failed %x\n", Status); 00221 #endif 00222 } 00223 else 00224 DPRINT1("RtlAllocateActivationContextStack failed %x\n", Status); 00225 } 00226 00227 /* Notify CSR */ 00228 Status = BasepNotifyCsrOfThread(hThread, &ClientId); 00229 if (!NT_SUCCESS(Status)) 00230 { 00231 ASSERT(FALSE); 00232 } 00233 00234 /* Success */ 00235 if(lpThreadId) *lpThreadId = (DWORD)ClientId.UniqueThread; 00236 00237 /* Resume it if asked */ 00238 if (!(dwCreationFlags & CREATE_SUSPENDED)) 00239 { 00240 NtResumeThread(hThread, &Dummy); 00241 } 00242 00243 /* Return handle to thread */ 00244 return hThread; 00245 } 地址:http://doxygen.reactos.org/da/d56/dll_2win32_2kernel32_2thread_2thread_8c_ab2f210336c32a96543dbd7c55e527dc0.html#ab2f210336c32a96543dbd7c55e527dc0 |
|
[求助]ntcreateprocess ntcreatethread
您说,没有suspend标志的话,线程在NtcreateThread返回时就会开始运行吗? 可:CreateThread在调用ZwCreateThread后还调用了别的函数。。。以及zwResumeThread,那这个zwResumeThread的作用是什么呢? 谢谢您了 |
|
[求助]ntcreateprocess ntcreatethread
代码我也没看明白。。呵呵。。先谢谢各位了。。 我只是想知道,当NtCreateXXXX这两个函数返回时,进程、线程就会立即开始运行吗(执行线程代码)?还是要等待别的条件就绪后,才会真正地执行代码? 因为我看到ring3的CreateThread在调用完ZwCreateThread后,还调用了“别的函数”,“别的函数”是在为线程的真正运行做准备吗?(如果ZwCreateThread返回时,线程还没动的话。。) |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值