(self)
| 23 | |
| 24 | |
| 25 | def test_asm_fixup(self): |
| 26 | asm_in: FilePath = "tests/data/peb_walk_pre_fixup.asm" |
| 27 | asm_text = file_readall_text(asm_in) |
| 28 | injectable = Injectable("fake.exe") |
| 29 | injectable.add_datareuse_fixup(DataReuseEntry("supermega_payload")) |
| 30 | settings: Settings = Settings() |
| 31 | settings.payload_location = PayloadLocation.DATA |
| 32 | asm_text_lines = parse_asm_text_file(injectable, asm_text, settings) |
| 33 | |
| 34 | # cmp DWORD PTR n$1[rsp], 11223344 ; 00ab4130H |
| 35 | # cmp DWORD PTR n$1[rsp], 272 ; 00ab4130H |
| 36 | #self.assertTrue(", 272" in lines[192-1]) |
| 37 | #self.assertTrue("11223344" not in lines[192-1]) |
| 38 | |
| 39 | # Original: |
| 40 | # mov r8, QWORD PTR supermega_payload |
| 41 | # New: |
| 42 | # lea r8, [shcstart] |
| 43 | #self.assertTrue("lea r8, [shcstart]" in asm_text_lines[198-1-1]) |
| 44 | self.assertTrue("DB 0" in asm_text_lines[198-1-1]) |
| 45 | |
| 46 | |
| 47 | def test_asm_iat_request(self): |
nothing calls this directly
no test coverage detected