??????TA?????API Hook
???????????? ???????[ 2012/10/9 10:33:53 ] ????????
?????????????????TA??TA???test automation?? ??????????????????????????????????????????????????????????С? ???????????????????????????????????????Щ?????????????????????????????????????????????????????????UI??????????Щ??????????????????????????????API??????????????????????????????????????????????????????????????????? ???е???Tooltip????????
?????????????????????????????????????д?????????????????????????????????????????????????API Hook????????????????????????????????Windows??API??????????????HooK????ЩAPI?????????л??????????????????????λ???????????????????????????????????????????
????????????????API Hook???????????????????????????????<<Windows??????>>??remoteThread???????????Detector.dll????????????????TA????????????????????TAUtil.dll??????????£?
???????????????????????????????????????????????????????????????????????????
?????????漰???????????????????????Ч???????????????????????????????????????WM_COPYDATA???????WM_COPYDATA?漰??????????????????????????????ò?????????????TAUtil.dll???????????????????????????????????Detector.dll??????????????????????????????????????????????WM_COPYDATA????
??????????′????????
????1??TA Tool????TAUtil.dll?? TAUtil.dll????????????
????2??TAUtil.dll?????????д???RemoteThread?? ?????????Detector.dll?? Detector.dll??Attatch???????????????
????3??TAUtil.dll???????Detector.dll?????????????????????????
????4??Detector.dll Hook ?滭?????API???????????????????????????????ж??Hook?????Detector.dll????????????????TAUtil.dll
????5??TAUtil.dll??????????????????.
?????????м????????????????????????????????????????????У???????????????? ????????ж?????????????????????????????WindowFromDC???ж????????????DC?????????API???????NULL?? ????????????????DC??????API???????????ж?????????????????????????????. ????????????????滭λ??????????DC?????????λ?á?windows?滭?????API????DrawTextA?? DrawTextW?? DrawTextExA?? DrawTextExW?? ExtTextOutA?? ExtTextOutW?? TabbedTextOutA?? TabbedTextOutW?? PolyTextOutA?? PolyTextOutW?? TextOutA?? TextOutW?? DC??????API????BitBlt??TransparentBlt??PatBlt??StretchBlt??.
???????????????????????? ???????????????β?????????????
??????????????????????????????Windows????????????? Windows????????????????GDI Object?? User Object?? Kernel Object?? GDI Object????Bitmap?? Brush?? DC?? Pen ?????Щ?????y???????Ч?? User Object????HWND??HMENU?????Щ?????????????κν?????????????????????????? Kernel Object ?????????????????????????????Mutex??Event?????????????????????????????и???????????
??????????????????????????????????????????????????HMENU??????????????API???????????????????????????????ε??????????. ?????????API Hook ????????Hook ??API TrackPopupMenu??TrackPopupMenuEx??????? ??????????
????1????????????API Hook
????2?????????????????
????3?????Hook ???????????ж??Hook
????4???????????API??????????????????
?????????API Hook?????????????????????????????????????????????????飬??????????????κ?ü??????????????????????????????85%????? ?????????????????UI?????????????????????漰???????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11