
Python-Implementierung von Minskys universeller Turingmaschine mit einem integrierten Exploit, der die Ausführung beliebigen Codes demonstriert (CVE-2021-32471), zu Bildungs- und Forschungszwecken.
Dies ist eine Implementierung der Universellen Turingmaschine, wie in Minsky, Computation: Finite and infinite machines, 1967, Kapitel 7, dargestellt.
Die Standardeingabe für die simulierte Maschine ist ein Exploit, der beliebige Codeausführung ermöglicht.
Führen Sie das Programm aus mit
$ python3.7 minskys_turing_machine.py
State 19 reading S writing B shifting left resulting in: 00111MYBAAXAAAAAAAXAABAAAAB1000Y01SX0000001X0010110X0100011X0110100Y00 Step 380
A
State 19 reading S writing B shifting left resulting in: 0011M0Y00BX0000000X001000011000Y00SX0000001X0010110X0100011X0110100Y00 Step 721
A
State 19 reading S writing B shifting left resulting in: 001M00Y00BX0000000X001000011000Y00SX0000001X0010110X0100011X0110100Y00 Step 1055
A
State 19 reading S writing B shifting left resulting in: 00M000Y00BX0000000X001000011000Y00SX0000001X0010110X0100011X0110100Y00 Step 1393
A
State 18 reading S writing A shifting left resulting in: 0M0000Y00AX0000000X001000011000Y00SX0000001X0010110X0100011X0110100Y00 Step 1735
A
State 18 reading S writing A shifting left resulting in: M00000Y00AX0000000X001000011000Y00SX0000001X0010110X0100011X0110100Y00 Step 1909
A
Ran out of tape!
Hilfe wird bereitgestellt mit
$ python3.7 minskys_turing_machine.py -h
usage: minskys_turing_machine.py [-h] [--machine_condition MACHINE_CONDITION]
[--machine_description MACHINE_DESCRIPTION]
[--machine_tape MACHINE_TAPE]
[--verbosity VERBOSITY]
A Universal Turing Machine as described in Minsky, Computation: Finite and
infinite machines, 1967, Chapter 7.
optional arguments:
-h, --help show this help message and exit
--machine_condition MACHINE_CONDITION
The internal state and the currently read symbol. The
default starts in state 00 and the head is scanning a
1.
--machine_description MACHINE_DESCRIPTION
The program of the Turing machine to be simulated.
--machine_tape MACHINE_TAPE
The simulated Turing machine's initial tape. The
default is an exploit that achieves arbitrary code
execution.
--verbosity VERBOSITY
Degree of vebosity, 1-4.
Die Schwachstelle wurde als CVE-2021-32471 registriert und wird im Detail in Pontus Johnsons Paper Intrinsic Propensity for Vulnerability in Computers? Arbitrary Code Execution in the Universal Turing Machine von 2021 vorgestellt. Es gibt auch einen Vortrag auf YouTube über die Schwachstelle und deren Ausnutzung.
Eine visuelle Simulation des Exploits ist unter https://intrinsic-propensity.github.io verfügbar.
Für eine alternative Neuimplementierung der anfälligen Minsky-Turingmaschine siehe Andreas Rozeks Spezifikation für Martín Ugartes Turingmaschinen-Simulator.