Detours.
????, ?????????? ??? Detours ????????????? ??????? Win32 API. ???? ???? ????????. ? ?????? ??????? ??????? ??????????? JMP ?? ??????? ???????????. ??? ????, ????? ??????? ???????????? ???????, ?? ???, ?? ????? ???????? ?????????? JMP, ?????????? ? ????? ? ??????????? ??????????? JMP ?? ?????? ?????????? ??????????.
?????????, ??????, ?? ???, ? ??????? ?????????????? ???????? ????????, ????? ???????? ?????????? ????? ??????:
- ??????????, ?? ????????? ?? ????????? ?? ??????????????? ???????, ?? ?? ???? ???????, ? ?? ??????? ??????? ???????. ???? ???, ?? ? ???????? ????????? ??????? imm32 ?? JMP;
- ??????????? ????? ???????, ?????? ?????????, ??? ??????? ????? ??????????? RET, JMP (?????? ????????) ??? INT3. ????????? ??? ???????? ?? ????? ????????, ???? ??? ??????? ?? ??? ?????????? ????, ??? ? ????;
- ????? JMP, ???????????? ????????????? ?? ??????? ???, ??????? INT3. ?? ??, ?? ?????? ??????;
- ??? ????????? ????????????? ???????? ? ??????????. ??????????????? (??? ?????????) ???? ??? ????????????, ???? ?????????? ????????????. ???????, 100% ???????? ??? ??? ????? ?? ????;
- ?? ? ???? ?? ????? ?????????????? ??????????? ????????? ?????????????, ??? ??? ????? ???????? ??????? ? ???????????? ??????????.
? ???? ?????? ?? ??????? ?????? ????????? hotpatching. ???, ???????????????? ? ?????????? hotpatching ????? ??????? ????? ?? ????, ?? ???????????? ?????? ? ????????.
Cross-posted from blog.not-a-kernel-guy.com.