找回密码
 立即注册→加入我们

QQ登录

只需一步,快速开始

搜索
热搜: 下载 VB C 实现 编写
查看: 5053|回复: 4

如何获取系统所有api函数

[复制链接]

307

主题

228

回帖

7319

积分

用户组: 真·技术宅

UID
2
精华
76
威望
291 点
宅币
5569 个
贡献
253 次
宅之契约
0 份
在线时间
945 小时
注册时间
2014-1-25
发表于 2014-3-4 13:28:14 | 显示全部楼层 |阅读模式

欢迎访问技术宅的结界,请注册或者登录吧。

您需要 登录 才可以下载或查看,没有账号?立即注册→加入我们

×
1.(for %i in (dir /s /b c:\windows\system32\*.dll) do dumpbin -exports %i) >out.txt
前200行:

G:\Users\Administrator\Desktop>dumpbin -exports dir
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file dir
DUMPBIN : fatal error LNK1181: cannot open input file "dir"
G:\Users\Administrator\Desktop>dumpbin -exports /s
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
DUMPBIN : warning LNK4044: unrecognized option "s"; ignored
  Summary

G:\Users\Administrator\Desktop>dumpbin -exports /b
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
DUMPBIN : warning LNK4044: unrecognized option "b"; ignored
  Summary

G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\6to4svc.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file c:\windows\system32\6to4svc.dll
File Type: DLL
  Section contains the following exports for 6to4Svc.dll
           0 characteristics
    4B73DA0D time date stamp Thu Feb 11 18:21:01 2010
        0.00 version
           1 ordinal base
           1 number of functions
           1 number of names
    ordinal hint RVA      name
          1    0 00015150 ServiceMain
  Summary
        3000 .data
        2000 .reloc
        1000 .rsrc
       16000 .text
G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\aaaamon.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file c:\windows\system32\aaaamon.dll
File Type: DLL
  Section contains the following exports for AAAAMON.dll
           0 characteristics
    3B7D796D time date stamp Sat Aug 18 04:07:09 2001
        0.00 version
           1 ordinal base
           1 number of functions
           1 number of names
    ordinal hint RVA      name
          1    0 00001B42 InitHelperDll
  Summary
        1000 .data
        1000 .reloc
        3000 .rsrc
        4000 .text
G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\aaclient.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file c:\windows\system32\aaclient.dll
File Type: DLL
  Section contains the following exports for aaclient.dll
           0 characteristics
    47917FE8 time date stamp Sat Jan 19 12:43:20 2008
        0.00 version
           1 ordinal base
           6 number of functions
           4 number of names
    ordinal hint RVA      name
          1    0 0000BA85 LoadClientAdapter
          5    1 0000DEFD OpenKeyReader
          6    2 0000DF0D OpenKeyReaderWriter
          4    3 0001F7F4 g_fnStartTransport
  Summary
        2000 .data
        3000 .reloc
        1000 .rsrc
       1E000 .text
G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\acctres.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file c:\windows\system32\acctres.dll
File Type: DLL
  Summary
        1000 .reloc
       10000 .rsrc
G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\acledit.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file c:\windows\system32\acledit.dll
File Type: DLL
  Section contains the following exports for ACLEDIT.dll
           0 characteristics
    3B7D7CDE time date stamp Sat Aug 18 04:21:50 2001
        0.00 version
           1 ordinal base
           8 number of functions
           8 number of names
    ordinal hint RVA      name
          4    0 00004BC6 DllMain
          1    1 0000323A EditAuditInfo
          2    2 00004010 EditOwnerInfo
          3    3 00003248 EditPermissionInfo
          5    4 00004ED6 FMExtensionProcW
          6    5 0000590A SedDiscretionaryAclEditor
          7    6 0000593F SedSystemAclEditor
          8    7 0000532C SedTakeOwnership
  Summary
        1000 .data
        1000 .reloc
        C000 .rsrc
       13000 .text
G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\aclui.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file c:\windows\system32\aclui.dll
File Type: DLL
  Section contains the following exports for ACLUI.dll
           0 characteristics
    48023D0E time date stamp Mon Apr 14 01:04:14 2008
        0.00 version
           1 ordinal base
          16 number of functions
           3 number of names
    ordinal hint RVA      name
          1    0 0000ACFD CreateSecurityPage
          2    1 0000ADAE EditSecurity
         16    2 0000132C IID_ISecurityInformation
  Summary
        1000 .data
        2000 .reloc
        5000 .rsrc
       12000 .text
G:\Users\Administrator\Desktop>dumpbin -exports c:\windows\system32\activeds.dll
Microsoft (R) COFF Binary File Dumper Version 6.00.8168

2.findstr /X ".*[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F].*[a-zA-Z_]$" out.txt > out2.txt
前100行:
          1    0 00015150 ServiceMain
          1    0 00001B42 InitHelperDll
          1    0 0000BA85 LoadClientAdapter
          5    1 0000DEFD OpenKeyReader
          6    2 0000DF0D OpenKeyReaderWriter
          4    3 0001F7F4 g_fnStartTransport
          4    0 00004BC6 DllMain
          1    1 0000323A EditAuditInfo
          2    2 00004010 EditOwnerInfo
          3    3 00003248 EditPermissionInfo
          5    4 00004ED6 FMExtensionProcW
          6    5 0000590A SedDiscretionaryAclEditor
          7    6 0000593F SedSystemAclEditor
          8    7 0000532C SedTakeOwnership
          1    0 0000ACFD CreateSecurityPage
          2    1 0000ADAE EditSecurity
         16    2 0000132C IID_ISecurityInformation
          4    0 00004E37 ADsBuildEnumerator
          8    1 00004F79 ADsBuildVarArrayInt
          7    2 00004ECD ADsBuildVarArrayStr
          6    5 00004EAD ADsEnumerateNext
          5    6 00004E89 ADsFreeEnumerator
          3    8 00004723 ADsGetObject
          9    9 000051CD ADsOpenObject
         23    B 00013790 AdsFreeAdsValues
         22    C 0001376E AdsTypeToPropVariant
         29   10 00005020 BinarySDToSecurityDescriptor
         27   11 00016889 ConvertSecDescriptorToVariant
         28   12 000158F6 ConvertSecurityDescriptorToSecDes
         10   13 000040B2 DllCanUnloadNow
         11   14 0000405A DllGetClassObject
         31   15 000040CC DllRegisterServer
         32   16 000043DB DllUnregisterServer
         21   19 00013A20 PropVariantToAdsType
         30   1D 00005064 SecurityDescriptorToBinarySD
          4    0 00001100 DllCanUnloadNow
          5    1 00010C20 DllGetClassObject
          6    2 00011776 DllRegisterServer
          7    3 000117A2 DllUnregisterServer
          3    4 0001172B GetProxyDllInfo
         15    0 00008470 AdmClose
         16    1 000082ED AdmFinished
         17    2 00008D61 AdmInit
         18    3 00008337 AdmReset
         19    4 000084EE AdmSaveData
         20    5 0000927A CheckDuplicateKeys
         21    6 00008F22 CreateAdmUi
         12    7 00008202 DllMain
         22    8 00009071 GetAdmCategories
         23    9 00009654 GetFontInfo
         13    A 000084D6 IsAdmDirty
         14    B 000084E1 ResetAdmDirtyFlag
          1    0 00002209 CreateSocketPort
          2    1 000022BC DeleteSocketPort
          3    2 00004384 FwBindFwInterfaceToAdapter
          4    3 000045B0 FwConnectionRequestFailed
          5    4 000040E1 FwCreateInterface
          6    5 00004195 FwDeleteInterface
          7    6 00004504 FwDisableFwInterface
          8    7 0000455A FwEnableFwInterface
          9    8 0000427B FwGetInterface
         10    9 0000464E FwGetNotificationResult
         11    A 000047A8 FwGetStaticNetbiosNames
         12    B 00003C81 FwIsStarted
         13    C 00004606 FwNotifyConnectionRequest
         14    D 000041EB FwSetInterface
         15    E 00004737 FwSetStaticNetbiosNames
         16    F 00003940 FwStart
         17   10 00003F48 FwStop
         18   11 000044AE FwUnbindFwInterfaceFromAdapter
         19   12 00004079 FwUpdateConfig
         20   13 0000466F FwUpdateRouteTable
         21   14 00002B3B GetAdapterNameFromMacAddrW
         22   15 00002B1E GetAdapterNameW
         23   16 0000495E GetFilters
         24   17 00002443 IpxAdjustIoCompletionParams
         25   18 0000358B IpxCreateAdapterConfigurationPort
         26   19 000032B7 IpxDeleteAdapterConfigurationPort
         27   1A 00002968 IpxDoesRouteExist
         28   1B 00003746 IpxGetAdapterConfig
         29   1C 00002763 IpxGetAdapterList
         30   1D 0000234B IpxGetOverlappedResult
         31   1E 000025FF IpxGetQueuedAdapterConfigurationStatus
         32   1F 000023BC IpxGetQueuedCompletionStatus
         33   20 000024C5 IpxPostQueuedCompletionStatus
         34   21 00002593 IpxRecvPacket
         35   22 000024E3 IpxSendPacket
         36   23 00003699 IpxWanCreateAdapterConfigurationPort
         37   24 00002BEC IpxWanQueryInactivityTimer
         38   25 00002B40 IpxWanSetAdapterConfiguration
         39   26 00005506 ServiceMain
         40   27 000048BF SetFilters
          1    0 00003EC1 DllCanUnloadNow
          2    1 00003EE4 DllGetClassObject
          1    0 00018C7C ??0CLexer@@QAE@PAG@Z
          2    1 00018CC0 ??1CLexer@@QAE@XZ
         54    2 000192A0 ?GetNextToken@CLexer@@QAEJPAGPAK@Z
        135    3 00018E38 ?SetAtDisabler@CLexer@@QAEXH@Z
        136    4 00018E60 ?SetExclaimnationDisabler@CLexer@@QAEXH@Z
        137    5 00018E4C ?SetFSlashDisabler@CLexer@@QAEXH@Z

3.findstr /V "@  $ \. : DllCanUnloadNow DllGetClassObject DllRegisterServer DllUnregisterServer ServiceMain DllMain CPlApplet DllGetVersion DllInstall" out2.txt > out3.txt
前50行:
         1    0 00001B42 InitHelperDll
          1    0 0000BA85 LoadClientAdapter
          5    1 0000DEFD OpenKeyReader
          6    2 0000DF0D OpenKeyReaderWriter
          4    3 0001F7F4 g_fnStartTransport
          1    1 0000323A EditAuditInfo
          2    2 00004010 EditOwnerInfo
          3    3 00003248 EditPermissionInfo
          5    4 00004ED6 FMExtensionProcW
          6    5 0000590A SedDiscretionaryAclEditor
          7    6 0000593F SedSystemAclEditor
          8    7 0000532C SedTakeOwnership
          1    0 0000ACFD CreateSecurityPage
          2    1 0000ADAE EditSecurity
         16    2 0000132C IID_ISecurityInformation
          4    0 00004E37 ADsBuildEnumerator
          8    1 00004F79 ADsBuildVarArrayInt
          7    2 00004ECD ADsBuildVarArrayStr
          6    5 00004EAD ADsEnumerateNext
          5    6 00004E89 ADsFreeEnumerator
          3    8 00004723 ADsGetObject
          9    9 000051CD ADsOpenObject
         23    B 00013790 AdsFreeAdsValues
         22    C 0001376E AdsTypeToPropVariant
         29   10 00005020 BinarySDToSecurityDescriptor
         27   11 00016889 ConvertSecDescriptorToVariant
         28   12 000158F6 ConvertSecurityDescriptorToSecDes
         21   19 00013A20 PropVariantToAdsType
         30   1D 00005064 SecurityDescriptorToBinarySD
          3    4 0001172B GetProxyDllInfo
         15    0 00008470 AdmClose
         16    1 000082ED AdmFinished
         17    2 00008D61 AdmInit
         18    3 00008337 AdmReset
         19    4 000084EE AdmSaveData
         20    5 0000927A CheckDuplicateKeys
         21    6 00008F22 CreateAdmUi
         22    8 00009071 GetAdmCategories
         23    9 00009654 GetFontInfo
         13    A 000084D6 IsAdmDirty
         14    B 000084E1 ResetAdmDirtyFlag
          1    0 00002209 CreateSocketPort
          2    1 000022BC DeleteSocketPort
          3    2 00004384 FwBindFwInterfaceToAdapter
          4    3 000045B0 FwConnectionRequestFailed
          5    4 000040E1 FwCreateInterface
          6    5 00004195 FwDeleteInterface
          7    6 00004504 FwDisableFwInterface
          8    7 0000455A FwEnableFwInterface
          9    8 0000427B FwGetInterface

4.notepad++正则表达式  将^.*[0-9A-F]{8} ([a-zA-Z_0-9]+)$替换为($1)得到out4.txt
前25行:
InitHelperDll
LoadClientAdapter
OpenKeyReader
OpenKeyReaderWriter
g_fnStartTransport
CPlApplet
DebugMain
EditAuditInfo
EditOwnerInfo
EditPermissionInfo
FMExtensionProcW
SedDiscretionaryAclEditor
SedSystemAclEditor
SedTakeOwnership
CreateSecurityPage
EditSecurity
IID_ISecurityInformation
ADsBuildEnumerator
ADsBuildVarArrayInt
ADsBuildVarArrayStr
ADsEnumerateNext
ADsFreeEnumerator
ADsGetObject
ADsOpenObject
AdsFreeAdsValues

5.对out4.txt进行正则搜索[a-zA-Z_0-9]{60,},发现最长的api是66个字母


6.对API排序,并去重
  1. open RESULT,'out4.txt';
  2. my $hash=();
  3. foreach $key (<RESULT>)
  4. {
  5.         chomp $key;
  6.         $hash{$key}=length $key;
  7. }
  8. close RESULT;

  9. open RESULT,'>out5.txt';
  10. select RESULT;

  11. for $i (sort keys %hash)
  12. {
  13.         print $hash{$i},"\t",$i,"\n";
  14. }
  15. close RESULT;
复制代码


结果:
data.part01.rar (1.5 MB, 下载次数: 30)
data.part02.rar (1.32 MB, 下载次数: 26)


回复

使用道具 举报

0

主题

19

回帖

52

积分

用户组: 小·技术宅

UID
160
精华
0
威望
1 点
宅币
31 个
贡献
0 次
宅之契约
0 份
在线时间
0 小时
注册时间
2014-3-27
发表于 2014-3-27 20:24:55 | 显示全部楼层
顶一个。。。。。。。。。。。。。
回复

使用道具 举报

1

主题

19

回帖

59

积分

用户组: 小·技术宅

UID
375
精华
0
威望
1 点
宅币
37 个
贡献
0 次
宅之契约
0 份
在线时间
1 小时
注册时间
2014-7-7
发表于 2014-7-7 13:01:21 | 显示全部楼层
支持一下,谢谢分享
回复 赞! 靠!

使用道具 举报

2

主题

59

回帖

458

积分

用户组: 中·技术宅

UID
2364
精华
0
威望
0 点
宅币
397 个
贡献
0 次
宅之契约
0 份
在线时间
53 小时
注册时间
2017-3-30
发表于 2017-9-28 19:08:27 | 显示全部楼层
好东西下载了
回复 赞! 靠!

使用道具 举报

0

主题

18

回帖

51

积分

用户组: 小·技术宅

UID
2933
精华
0
威望
2 点
宅币
29 个
贡献
0 次
宅之契约
0 份
在线时间
2 小时
注册时间
2017-10-9
发表于 2017-10-9 17:47:24 | 显示全部楼层
6的飞起
回复

使用道具 举报

QQ|Archiver|小黑屋|技术宅的结界 ( 滇ICP备16008837号 )|网站地图

GMT+8, 2024-3-29 18:23 , Processed in 0.040433 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表