Kernel-mode injection Injection context Target image Init function RVA
| 697 | /// <param name="img">Target image</param> |
| 698 | /// <param name="initRVA">Init function RVA</param> |
| 699 | NTSTATUS InjectionCore::InjectKernel( |
| 700 | InjectContext& context, |
| 701 | const blackbone::pe::PEImage& img, |
| 702 | uint32_t initRVA /*= 0*/ |
| 703 | ) |
| 704 | { |
| 705 | if (context.cfg.injectMode == Kernel_MMap) |
| 706 | { |
| 707 | return blackbone::Driver().MmapDll( |
| 708 | context.pid, |
| 709 | img.path(), |
| 710 | (KMmapFlags)context.cfg.mmapFlags, |
| 711 | initRVA, |
| 712 | context.cfg.initArgs |
| 713 | ); |
| 714 | } |
| 715 | else |
| 716 | { |
| 717 | return blackbone::Driver().InjectDll( |
| 718 | context.pid, |
| 719 | img.path(), |
| 720 | (context.cfg.injectMode == Kernel_Thread ? IT_Thread : IT_Apc), |
| 721 | initRVA, |
| 722 | context.cfg.initArgs, |
| 723 | context.cfg.unlink, |
| 724 | context.cfg.erasePE |
| 725 | ); |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | /// <summary> |
| 730 | /// Manually map another system driver into system space |
nothing calls this directly
no outgoing calls
no test coverage detected