about summary refs log tree commit diff stats
path: root/example/asm/shellcode.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-10-31Aarch64: add ldarbFabrice Desclaux3-1/+5
2019-10-31Remove non working/useless api from ircfgFabrice Desclaux1-10/+0
2019-10-23doc: moved the "what" at the topMartin Monperrus1-18/+18
2019-10-19Adds a forgotten importMaxime Meignan1-1/+1
2019-10-17Loader: avoid None dst_ad in lib_imp2dstadWilliam Bruneau1-1/+2
2019-10-17Fix python2/python3 bytes manipulationFabrice Desclaux1-1/+1
2019-10-17X86/sem: fix tipo during python2/3 updtFabrice Desclaux1-5/+5
2019-10-16Jitter: remove Clang warningsWilliam Bruneau1-2/+0
2019-10-16Jitter: remove unused macroWilliam Bruneau1-1/+0
Furthermore this macro is already declared in android and thus generates a warning.
2019-10-16Jitter: fix compilation on androidWilliam Bruneau1-0/+4
2019-10-16Avoid deprecation warningWilliam Bruneau1-2/+2
2019-10-09Fix IDA depgraph exampleWilliam Bruneau1-3/+4
2019-10-06arch: x86: add translation from roundsd to IRZheng Luo1-0/+31
This change adds three new ops for rounding: - 'fpround_towardsnearest': rounds to nearest int, even for ties - 'fpround_down': rounds to nearest int <= float - 'fpround_up': rounds to nearest int >= float - 'fpround_towardszero'(existing): rounds to nearest int s.t. |int| <= |float| For a variant of roundsd that uses mxcsr register as the rounding mode, currently we assume it's fpround_towardsnearest. This may cause trouble if the program modifies MXCSR register. Tested: $ objdump -dSC rounds.so 0000000000001000 <entry>: 1000: 66 0f 3a 0b c0 01 roundsd $0x1,%xmm0,%xmm0 1006: 66 0f 3a 0a c0 0c roundss $0xc,%xmm0,%xmm0 100c: c3 retq $ cat test.py from miasm.analysis.binary import * from miasm.analysis.machine import Machine from miasm.expression.simplifications import expr_simp with open('rounds.so', 'rb') as f: cont = ContainerELF.from_stream(f) machine = Machine(cont.arch) mdis = machine.dis_engine(cont.bin_stream, loc_db=cont.loc_db) asmcfg = mdis.dis_multiblock(cont.loc_db.get_name_offset('entry')) ir = machine.ir(asmcfg.loc_db) ircfg = ir.new_ircfg_from_asmcfg(asmcfg) ircfg.simplify(expr_simp) print(ircfg.blocks[ircfg.heads()[0]].to_string()) $ python test.py loc_key_0: XMM0 = {fpround_down(XMM0[0:64]) 0 64, XMM0[64:128] 64 128} XMM0 = {fpround_towardsnearest(XMM0[0:32]) 0 32, XMM0[32:128] 32 128} RSP = RSP + 0x8 RIP = @64[RSP] IRDst = @64[RSP]
2019-10-06arch: x86: add roundsd decoderZheng Luo1-0/+4
2019-10-06arch: x86: make UD2 break control flowZheng Luo1-1/+1
2019-09-30fix int 1 handlingLouis6-2/+19
2019-09-25Add a few PPC32 testsAymeric Vincent3-0/+248
2019-09-25add "ba" to the list; allows PPC tests to pass the codespell spellAymeric Vincent1-0/+1
2019-09-24modify CreateFile to open file in binary-modestanislas1-2/+2
2019-09-22Fix get_str_ansi: return strFabrice Desclaux10-57/+51
get_str_ansi and get_str_unic now returns both *str* object: As get_str_unic decodes the string, get_str_ansi should do the same.
2019-09-22Fix bytes dllnameFabrice Desclaux5-10/+19
2019-09-21Add miasm logoFabrice Desclaux2-0/+5
2019-09-20Codespell: add excetion 'blocs' to keep API unchangedWilliam Bruneau1-0/+1
Fixing some codespell errors would imply modifying some API. Codespell errors: miasm/core/asmblock.py:1608: blocs ==> blocks def dis_multibloc(self, offset, blocs=None): miasm/core/asmblock.py:1614: blocs ==> blocks return self.dis_multiblock(offset, blocs)
2019-09-20Codespell: fix some spelling mistakesWilliam Bruneau13-34/+34
2019-09-20Loader: add exception in vm2pe for PC < image baseWilliam Bruneau1-1/+4
2019-08-29Travis: llvm-toolchain-trusty-6.0 to llvm-toolchain-xenial-6.0William Bruneau1-1/+1
see: https://travis-ci.community/t/cannot-apt-get-install-clang-5-0/3250
2019-08-08Fix str/bytes handling in pe loaderCaroline Leman1-3/+3
2019-08-01Objc: support segm opWilliam Bruneau1-1/+2
2019-07-26Fix example/ida/menu.py for IDA >= 7.1William Bruneau1-0/+2
2019-06-28test: mem_breakpoint.py as a sample of memory breakpoints and its handlers. ↵idl3r2-0/+83
(#1050) * test: add mem_breakpoint.py * test: enable args * test: add mem_breakpoint.py to test_all script * test: update memory mapping in mem_breakpoint.py
2019-06-17fix typo in msp430's sem.pyNinjananas1-1/+1
2019-06-13Add extended tests in travisAjax1-1/+6
2019-05-27Expression: add p3 orderingFabrice Desclaux1-0/+5
2019-05-23Replace macOS bundles by dylibsHugo Porcher1-0/+13
2019-05-23Fix endianness for macOSHugo Porcher1-4/+2
2019-05-18Fix tipoFabrice Desclaux9-9/+11
2019-05-17Remove get_mem and set_mem from JitCpuWilliam Bruneau11-303/+6
2019-05-15Fix compilationWilliam Bruneau12-14/+21
- add miasm/jitter/vm_mngr_py.c dependency to all JitCore (needed for PyLong_to_bn and bn_to_PyLong functions) - vm_set_mem and vm_get_mem already exist in miasm/jitter/arch/JitCore_*.c so must be renamed in miasm/jitter/vm_mngr_py.c
2019-05-15bn_to_PyLongWilliam Bruneau3-51/+31
2019-05-15PyLong_to_bnWilliam Bruneau5-153/+47
2019-05-09Move "llvmlite" to optional requirementsAjax2-1/+1
2019-05-09Loader example: test_pe: remove useless imports, comment and renameAjax3-32/+34
2019-05-09Add loader examples (only "test_pe" for now) in testsAjax1-0/+12
2019-05-09Example: rename elfesteem -> loaderAjax2-0/+0
2019-05-02Loader: fix static elf symtabFabrice Desclaux1-0/+2
2019-04-19Fix typos in IR documentationSpl3en1-2/+2
2019-04-16Update test/jitter/jitcore.pyPierre Lalet1-1/+1
Co-Authored-By: WilliamBruneau <william.bruneau@epfedu.fr>
2019-04-16Update test/jitter/jitcore.pyPierre Lalet1-1/+1
Co-Authored-By: WilliamBruneau <william.bruneau@epfedu.fr>
2019-04-16Update test/jitter/jitcore.pyPierre Lalet1-1/+1
Co-Authored-By: WilliamBruneau <william.bruneau@epfedu.fr>
2019-04-12x86: add FXSAVE and FXRSTOR as NOP instrAjax1-0/+10