Created
December 28, 2020 00:41
-
-
Save dbwodlf3/94a80e0dab7995dbc638d823649861d4 to your computer and use it in GitHub Desktop.
x86_pattern in smc LLVM IR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ================================================================================ | |
| Write Executable Memory. 전부 NO-PIE 패턴 | |
| ========== | |
| Pattern 1. | |
| x86_smc1.out.ll | |
| (바로 쓰기) | |
| store i8 1, i8* @data_804807b | |
| ========== | |
| Pattern 2. | |
| x86_smc3.out.ll | |
| (바로 쓰는데, bitcast 사용) | |
| %0 = load i32, i32* bitcast (i8* @data_804811d to i32*) | |
| store i32 %0, i32* bitcast (i8* @data_8048135 to i32*) | |
| store i16 0, i16* bitcast (i8* @data_8048136 to i16*) | |
| store i16 0, i16* bitcast (i8* @data_8048138 to i16*) | |
| (특정 레지스터 경유하여 쓰기.) | |
| store i8* @data_804813a, i8** @EDI_2296_55ccbaa41840 | |
| %14 = load i8*, i8** @EDI_2296_55ccbaa41840 | |
| %16 = bitcast i8* %14 to i16* | |
| store i16 %13, i16* %16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment