diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-01-06 18:03:10 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-01-23 17:24:41 +0100 |
| commit | b495563e636c223be39d5ed516572f6a8406b2b3 (patch) | |
| tree | fbe737976e1a77582e3a2733b36cb79dafdaa3ff /example/samples | |
| parent | fc814adc2c5ee28e282b4212fefa187a59ccf46d (diff) | |
| download | miasm-b495563e636c223be39d5ed516572f6a8406b2b3.tar.gz miasm-b495563e636c223be39d5ed516572f6a8406b2b3.zip | |
Examples: Move used samples to a common place: /samples
Diffstat (limited to 'example/samples')
| -rwxr-xr-x | example/samples/box.exe | bin | 0 -> 21827 bytes | |||
| -rwxr-xr-x | example/samples/box_upx.exe | bin | 0 -> 14659 bytes | |||
| -rwxr-xr-x | example/samples/md5_arm | bin | 0 -> 15381 bytes | |||
| -rw-r--r-- | example/samples/x86_32_mod.S | 35 | ||||
| -rw-r--r-- | example/samples/x86_32_mod_self.S | 20 | ||||
| -rw-r--r-- | example/samples/x86_32_repmod.S | 46 | ||||
| -rw-r--r-- | example/samples/x86_32_sc.bin | 1 | ||||
| -rw-r--r-- | example/samples/x86_32_simple.S | 12 |
8 files changed, 114 insertions, 0 deletions
diff --git a/example/samples/box.exe b/example/samples/box.exe new file mode 100755 index 00000000..1c11bcda --- /dev/null +++ b/example/samples/box.exe Binary files differdiff --git a/example/samples/box_upx.exe b/example/samples/box_upx.exe new file mode 100755 index 00000000..d0776ec2 --- /dev/null +++ b/example/samples/box_upx.exe Binary files differdiff --git a/example/samples/md5_arm b/example/samples/md5_arm new file mode 100755 index 00000000..148e0611 --- /dev/null +++ b/example/samples/md5_arm Binary files differdiff --git a/example/samples/x86_32_mod.S b/example/samples/x86_32_mod.S new file mode 100644 index 00000000..df7792af --- /dev/null +++ b/example/samples/x86_32_mod.S @@ -0,0 +1,35 @@ +main: + CALL test_automod + CALL test_automod + RET + +test_automod: + PUSH EBP + MOV EBP, ESP + +loop: + MOV EAX, 0 + CMP EAX, 0 + JMP mod_addr +mod_addr: + JNZ end + + PUSH 0 + PUSH title + PUSH msg + PUSH 0 + CALL DWORD PTR [ MessageBoxA ] + + ; automodif code + MOV BYTE PTR [mod_addr], 0xEB + JMP loop +end: + MOV BYTE PTR [mod_addr], 0x75 + MOV ESP, EBP + POP EBP + RET + +title: +.string "Hello!" +msg: +.string "World!" diff --git a/example/samples/x86_32_mod_self.S b/example/samples/x86_32_mod_self.S new file mode 100644 index 00000000..398438ec --- /dev/null +++ b/example/samples/x86_32_mod_self.S @@ -0,0 +1,20 @@ +main: + PUSH EBP + MOV EBP, ESP + MOV BYTE PTR [myint], 0x90 +myint: + INT 0x3 + + PUSH 0 + PUSH title + PUSH msg + PUSH 0 + CALL DWORD PTR [ MessageBoxA ] + MOV ESP, EBP + POP EBP + RET + +title: +.string "Hello!" +msg: +.string "World!" diff --git a/example/samples/x86_32_repmod.S b/example/samples/x86_32_repmod.S new file mode 100644 index 00000000..332a876c --- /dev/null +++ b/example/samples/x86_32_repmod.S @@ -0,0 +1,46 @@ +main: + CALL test_automod + RET + +lbl_good: + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + NOP + +test_automod: + PUSH EBP + MOV EBP, ESP + + LEA EDI, DWORD PTR [lbl_mod] + LEA ESI, DWORD PTR [lbl_good] + + MOV ECX, 0x8 + REPE MOVSB +lbl_mod: + XOR EAX, EAX + MOV DWORD PTR [EAX], 0xDEADC0DE + + NOP + NOP + NOP + + PUSH 0 + PUSH title + PUSH msg + PUSH 0 + CALL DWORD PTR [ MessageBoxA ] + + MOV ESP, EBP + POP EBP + RET + +title: +.string "Hello!" +msg: +.string "World!" diff --git a/example/samples/x86_32_sc.bin b/example/samples/x86_32_sc.bin new file mode 100644 index 00000000..c1931ce0 --- /dev/null +++ b/example/samples/x86_32_sc.bin @@ -0,0 +1 @@ +I[t[[ \ No newline at end of file diff --git a/example/samples/x86_32_simple.S b/example/samples/x86_32_simple.S new file mode 100644 index 00000000..f38c232f --- /dev/null +++ b/example/samples/x86_32_simple.S @@ -0,0 +1,12 @@ +main: + PUSH 0 + PUSH title + PUSH msg + PUSH 0 + CALL DWORD PTR [ MessageBoxA ] + RET + +title: +.string "Hello!" +msg: +.string "World!" |