首页
社区
课程
招聘
我这句逆的解释有问题吗
发表于: 2009-11-29 20:04 3389

我这句逆的解释有问题吗

2009-11-29 20:04
3389
这里是不是通过加载urlmon.dll Wininet.dll  Kernel32.dll Advapi32.dll
获取下url下载目录,获取缓存文件,获取Temp文件,启用user
10001AF4 55 push ebp
10001AF5 8BEC mov ebp,esp
10001AF7 83EC 34 sub esp,34
10001AFA 68 9C310010 push as.1000319C ; ASCII "ntdll.dll"
10001AFF FF15 40300010 call dword ptr ds:[<&KERNEL32.GetModuleH>; kernel32.GetModuleHandleA
10001B05 8945 D0 mov dword ptr ss:[ebp-30],eax
10001B08 68 A8310010 push as.100031A8 ; ASCII "NtQuerySystemInformation"
10001B0D FF75 D0 push dword ptr ss:[ebp-30]
10001B10 FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
10001B16 A3 FC610010 mov dword ptr ds:[100061FC],eax
10001B1B C745 D8 75726C6>mov dword ptr ss:[ebp-28],6D6C7275
10001B22 C745 DC 6F6E2E6>mov dword ptr ss:[ebp-24],642E6E6F
10001B29 C745 E0 6C6C000>mov dword ptr ss:[ebp-20],6C6C
10001B30 6A 00 push 0
10001B32 6A 00 push 0
10001B34 8D45 D8 lea eax,dword ptr ss:[ebp-28]
10001B37 50 push eax |FileName = "urlmon.dll"
10001B38 FF15 78300010 call dword ptr ds:[<&KERNEL32.LoadLibrar>; kernel32.LoadLibraryExA
10001B3E 8945 D4 mov dword ptr ss:[ebp-2C],eax
10001B41 68 C4310010 push as.100031C4 ; ASCII "URLDownloadToFileA"
10001B46 FF75 D4 push dword ptr ss:[ebp-2C]
10001B49 FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
10001B4F A3 00620010 mov dword ptr ds:[10006200],eax
10001B54 6A 00 push 0
10001B56 6A 00 push 0
10001B58 68 D8310010 push as.100031D8 ; |FileName=Wininet.dll"
10001B5D FF15 78300010 call dword ptr ds:[<&KERNEL32.LoadLibrar>; kernel32.LoadLibraryExA
10001B63 8945 F8 mov dword ptr ss:[ebp-8],eax
10001B66 68 E4310010 push as.100031E4 ; ASCII "GetUrlCacheEntryInfoA"
10001B6B FF75 F8 push dword ptr ss:[ebp-8]
10001B6E FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
10001B74 A3 04620010 mov dword ptr ds:[10006204],eax
10001B79 6A 00 push 0
10001B7B 6A 00 push 0
10001B7D 68 1C310010 push as.1000311C ; ASCII "Kernel32.dll"
10001B82 FF15 78300010 call dword ptr ds:[<&KERNEL32.LoadLibrar>; kernel32.LoadLibraryExA
10001B88 8945 CC mov dword ptr ss:[ebp-34],eax
10001B8B 68 FC310010 push as.100031FC ; ASCII "GetTempPathA"
10001B90 FF75 CC push dword ptr ss:[ebp-34]
10001B93 FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
10001B99 A3 08620010 mov dword ptr ds:[10006208],eax
10001B9E 68 0C320010 push as.1000320C ; ASCII "WinExec"
10001BA3 FF75 CC push dword ptr ss:[ebp-34]
10001BA6 FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
10001BAC A3 0C620010 mov dword ptr ds:[1000620C],eax
10001BB1 6A 00 push 0
10001BB3 6A 00 push 0
10001BB5 68 14320010 push as.10003214 ; ASCII "Advapi32.dll"
10001BBA FF15 78300010 call dword ptr ds:[<&KERNEL32.LoadLibrar>; kernel32.LoadLibraryExA
10001BC0 8945 FC mov dword ptr ss:[ebp-4],eax
10001BC3 68 24320010 push as.10003224 ; ASCII "CreateProcessAsUserA"
10001BC8 FF75 FC push dword ptr ss:[ebp-4]
10001BCB FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
10001BD1 A3 10620010 mov dword ptr ds:[10006210],eax
10001BD6 33C0 xor eax,eax
10001BD8 40 inc eax
10001BD9 C9 leave
10001BDA C3 retn

[课程]Linux pwn 探索篇!

收藏
免费 0
支持
分享
最新回复 (10)
雪    币: 163
活跃值: (103)
能力值: ( LV5,RANK:70 )
在线值:
发帖
回帖
粉丝
2
动态获取函数地址,放入变量中,其他没什么
2009-11-29 20:10
0
雪    币: 173
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
获取缓存文件,获取Temp文件,启用user
不是通过上面加载的DLL获取的吗
2009-11-29 20:13
0
雪    币: 722
活跃值: (123)
能力值: ( LV12,RANK:300 )
在线值:
发帖
回帖
粉丝
4
呃,锈剑……
这只是使用LoadLibraryEx和GetProcAddress获取所需要的API函数,保存函数地址,以便随后进行调用。
也就是说调用这些获取得到的API的代码才是真正实现功能的。
另外CreateProcessAsUserA不是“启用user”,而是以某个用户的身份和权限启动进程。
2009-11-29 20:14
0
雪    币: 173
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
10001B54 |. 6A 00 push 0 ; /Flags = 0
10001B56 |. 6A 00 push 0 ; |hFile = NULL
10001B58 |. 68 D8310010 push as.100031D8 ; |FileName = "Wininet.dll"
10001B5D |. FF15 78300010 call dword ptr ds:[<&KERNEL32.LoadLibrar>; \LoadLibraryExA
10001B63 |. 8945 F8 mov [local.2],eax
10001B66 |. 68 E4310010 push as.100031E4 ; /ProcNameOrOrdinal = "GetEntryInfoUrlCacheA"
10001B6B |. FF75 F8 push [local.2] ; |hModule = "Wininet.dll"
10001B6E |. FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; \GetProcAddress

比如这APILoadLibraryExA是加载wininet.dll吧,然后通过调用

GetProcAddress来获取wininet.dll输出库函数地址
那么GetEntryInfoUrlCacheA是不是要调用wininet
其实想问下是这个意思,小聪
2009-11-29 20:32
0
雪    币: 173
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
LoadLibraryEx和GetProcAddress
其实就是对DLL的加载和调用,我是这么理解的,不知道对否
2009-11-29 20:41
0
雪    币: 50
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
10001B54    6A 00           push 0
10001B56    6A 00           push 0
10001B58    68 D8310010     push as.100031D8                         ; |FileName=Wininet.dll"
10001B5D    FF15 78300010   call dword ptr ds:[<&KERNEL32.LoadLibrar>; kernel32.LoadLibraryExA
10001B63    8945 F8         mov dword ptr ss:[ebp-8],eax
10001B66    68 E4310010     push as.100031E4                         ; ASCII "GetUrlCacheEntryInfoA"
10001B6B    FF75 F8         push dword ptr ss:[ebp-8]
10001B6E    FF15 3C300010   call dword ptr ds:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress;获得"GetUrlCacheEntryInfoA"函数的地址,返回值在eax中
10001B74    A3 04620010     mov dword ptr ds:[10006204],eax
;保存"GetUrlCacheEntryInfoA"函数的地址在[10006204]里以便以后调用,
例如以后要调用GetUrlCacheEntryInfoA"函数可以这详
push 参数3
push 参数2
push 参数1
call [10006204];

回5楼 GetEntryInfoUrlCacheA不是要调用wininet
2009-11-29 20:52
0
雪    币: 173
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
10001B66  |.  68 E4310010   push as.100031E4                         ; /ProcNameOrOrdinal = "push as"
10001B6B  |.  FF75 F8       push [local.2]                           ; |hModule = "Wininet.dll"
10001B6E  |.  FF15 3C300010 call dword ptr ds:[<&KERNEL32.GetProcAdd>; \
在VC中
FARPROC GetProcAddress(
  HMODULE hModule, // DLL模块句柄
  LPCSTR lpProcName // 函数名
  );
getprocaddress中
这个应该是掉用dll模块
原来是分开的压栈操作
2009-11-29 21:15
0
雪    币: 50
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
不是调用,LoadLibrary是把dll加载进内存(用完后还要把它从内存中释放),加载进内存后才能有获得函数地址

GetProcAddress是获得函数在内存中的地址即指针,之后就可以用这个指针来调用该函数
2009-11-29 21:37
0
雪    币: 173
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
谢谢楼上几位,知道了
2009-11-29 21:42
0
雪    币: 135
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
俺也来学习下了
2009-11-30 10:54
0
游客
登录 | 注册 方可回帖
返回
//