
논문 "컴퓨터의 취약성에 대한 내재적 경향? 보편 튜링 기계에서의 임의 코드 실행"에서 고려된 Minsky 튜링 기계를 구현 및 악용하는 Python 프로그램으로, CVE-2021-32471 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32471)에 따른 것입니다.
이는 1967년 Minsky의 저서 Computation: Finite and infinite machines 7장에 제시된 보편 튜링 기계의 구현입니다.
시뮬레이션된 기계의 기본 입력은 임의 코드 실행을 달성하는 익스플로잇입니다.
프로그램을 다음 명령으로 실행합니다
$ 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!
도움말은 다음 명령으로 확인할 수 있습니다
$ 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.
이 취약점은 CVE-2021-32471로 지정되었으며, Pontus Johnson의 2021년 논문 Intrinsic Propensity for Vulnerability in Computers? Arbitrary Code Execution in the Universal Turing Machine에서 자세히 설명되어 있습니다. 또한 취약점 및 그 익스플로잇에 대한 YouTube 강연도 있습니다.
익스플로잇의 시각적 시뮬레이션은 https://intrinsic-propensity.github.io에서 확인할 수 있습니다.
취약한 Minsky 튜링 기계의 대체 재구현을 원한다면 Martín Ugarte의 튜링 기계 시뮬레이터를 위한 Andreas Rozek의 명세를 확인하세요.