I found this recently: https://github.com/xoreaxeaxeax/movfuscator
It seems to be contingent on the fact that mov is turing-complete. Is that true, and why?
Why is mov turing complete?
13.8k Views Asked by schuelermine At
2
There are 2 best solutions below
0
zetavolt
On
Systems rarely come to be known as Turing Complete through direct proof of their capacity for all Turing-computable functions. Instead, they often are "analogized" to an existing system already known to be Turing Complete.
The paper by Stephen Dolan which shows mov to be TC does this by constructing a simulation of a TM system in terms of mov. It follows that any question which could be posed to the TC system could, at worst, be virtualized within the mov-constructed simulation.
Related Questions in ASSEMBLY
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- How to call a C language function from x86 assembly code?
- Binary Bomb Phase 2 - Decoding Assembly
- AVR Assembly Clock Cycle
- Understanding the differences between mov and lea instructions in x86 assembly
- ARM Assembly code is not executing in Vitis IDE
- Which version of ARM does the M1 chip run on?
- Why would %rbp not be equal to the value of %rsp, which is 0x28?
- Move immediate 8-bit value into RSI, RDI, RSP or RBP
- Unable to run get .exe file from assembly NASM
- DOSbox automatically freezes and crashes without any prompt warnings
- Load function written in amd64 assembly into memory and call it
- link.exe unresolved external symbol _mainCRTStartup
- x86 Wrote a boot loader that prints a message to the screen but the characters are completely different to what I expected
- running an imf file using dosbox in parallel to a game
Related Questions in X86
- How to call a C language function from x86 assembly code?
- the difference between two style of inline ASM
- Understanding the differences between mov and lea instructions in x86 assembly
- ARM Assembly code is not executing in Vitis IDE
- x86 - compare numbers and push the result onto the stack
- Seeking for the the method for adding the DL (data register) value to DX register
- link.exe unresolved external symbol _mainCRTStartup
- x86 Wrote a boot loader that prints a message to the screen but the characters are completely different to what I expected
- How does CPU tell between MMIO(Memory Mapped IO) and normal memory access in x86 architecture
- Why do register arg values need to be re-assigned in NASM after an int 0x80 system call?
- Why does LLVM-MCA measure an execution stall?
- Why does shr eax, 32 not do anything?
- Evaluating this in Assembly (A % B) % (C % D)
- Understanding throughput of simd sum implementation x86
- Making portable execution errors
Related Questions in COMPUTER-SCIENCE
- what's the difference between "nn layout" and "nt layout"
- Theory of Comp Sci - State Diagrams NFAs
- What is devops meaning ? What requirement?
- How to test that a specific sorting algorithm was actually implemented?
- Creating a more efficient algorithm for taking the third largest difference an element has with another element in the list in python
- Theory of computer science problems
- Choosing a sequence of bitwise operations
- How to determine the time complexity of a recursive function that has a loop enclosed in it?
- Find median in constant time O(1)
- The factorial of an inputted number in Flowgorithm
- How come checking for printable bytes is faster with the "in" operator rather than interval comparisons?
- PageRank Algorithm on a Graph with a Sink Node
- recursion relation problem solve only using back substitution method
- Integrating Jenkins CI/CD with WinDev Framework for Academic Project
- Formatting multiplication tables in python; not how to, just some explanation
Related Questions in MOV
- Understanding the differences between mov and lea instructions in x86 assembly
- Shifting bytes in ARM into a temp register using MOVZ and MOVK
- Breakdown MOV instruction on Intel 64 compatibility mode
- Why is LEA (Load Effective Address) necessary?
- Why do parentheses do different things based on context in AT&T syntax?
- x86: movsxd taking a long time on Intel's Cascade Lake machine (Core i9-10980XE)
- MOV r, M instruction in 8085 microprocessor
- Why does the opcode for MOV from a segment register not have its low bit set? It's not 8-bit operand-size, so the W bit should be set
- Why are %rbp and %rax invalid operands for movl?
- Assembly language error with the mov instruction
- NASM - Selecting multiple values to output different string lengths
- Second Operand in MOV instruction
- Asembly program with mov function
- how to load an immediate value to the register in arm64?
- MOVSXD operation when operand sizes are equal
Related Questions in TURING-COMPLETE
- What is the most basic assembler language that is turing complete?
- Understanding the primitives which Turing showed to be sufficient for a programming language
- How would a Turing machine implement memory protection, interrupts, or real timer that a modern CPU has?
- Fixpoint of type exponentiation as a language
- Can any additional axiom make Coq Turing complete?
- TOC program A that when given any program B as input can determine whether or not B produces “hello world”
- Would x86 still be fully programmable if it didn't have the Sign Flag (SF)?
- Could you mine cryptocurrencies with the LaTeX language?
- Is pure Prolog Turing-complete, and if so, why can't it implement list intersection?
- Why is mov turing complete?
- Turing Machine For balanced parenthesis
- Datalog computational class?
- Turing machine for addition and comparison of binary numbers
- Is MapReduce Turing Complete?
- Is Move a Turing-complete language?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes, x86's
movis Turing complete. I added that tag to your question because it may not be true for other ISAs with an instruction calledmov, and the movfuscator compiler only targets x86.It's not "mov" itself doing computation, it's x86 addressing modes which can do addition (and bit-shift). I haven't looked in detail at how it works, but it relies a lot on lookup tables, and stuff like
mov eax, [base + eax*4]loading one of two possible values depending on EAX being 0 or 1.Also remember that x86
movhas several forms: between memory and register (load, store, or reg<-reg), or immediate to memory or register. And with addressing modes including absolute and register indirect.I don't think it relies on self-modifying code, but correct me if I'm wrong. (And if it does, I think/hope movfuscator at least won't create instructions other than
mov. That would be cheating.)Also, it's only sort of true; you need some way to loop the main program, assuming the original source isn't straight-line with no loops - the Movfuscator github readme talks about this:
When creating a user-space environment for mov-only code to run, I assume it creates a SIGSEGV handler (on POSIX OSes) that restarts execution from the top. So any faulting load can restart the main loop.
Letting execution wrap around is also mentioned as a possibility:
Wraparound of IP can work well in 16-bit mode where IP is 16-bit but CS:IP form a 20-bit linear address (real mode) or in 16-bit protected mode a 64k window somewhere in linear address space. i.e. you can have a 64k block of instructions in only part of your address space, with other space left for data. The DS segment can use a different base. (32-bit addressing modes in 16-bit mode are possible so you still have the full power of any register and scaled-index addressing mode.) Note that the mnemonic for reading and writing segment registers is also
mov.But harder in 32-bit mode where EIP is 32-bit and so are linear addresses after seg+off calculation. Unless there's some other trick, wraparound can only happen across the entire address space, regardless of what you do with segmentation. This leaves no non-code space for data. Setting a lower segment limit could make code-fetch fault, but that doesn't cause wraparound (unless you set a signal handler, or on bare metal set an interrupt handler address).
And either way, even x86-64 only has 64-bit pointers (in theory; 48 or 57-bit in practice), so space is finite, unlike a real Turing machine with infinite tape.