# Deep dive into Python's VM: Story of LOAD\_CONST bug

DevFeed: [Deep dive into Python's VM: Story of LOAD\_CONST bug](<https://devfeed.tech/articles/deep-dive-into-python-s-vm-story-of-load-const-bug-39694.md>)

Original publisher: [Read original article](<https://doar-e.github.io/blog/2014/04/17/deep-dive-into-pythons-vm-story-of-load_const-bug/>)

Author: Axel "0vercl0k" Souchet

Published: 2014-04-18T06:22:00Z

Content type: article

Language: en

Sources: [Diary of a reverse-engineer](<https://devfeed.tech/sources/diary-of-a-reverse-engineer.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [bug](<https://devfeed.tech/topics/bug.md>), [x86](<https://devfeed.tech/topics/x86.md>), [Code](<https://devfeed.tech/topics/code.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [c](<https://devfeed.tech/tags/c.md>), [ctf](<https://devfeed.tech/tags/ctf.md>), [exploitation](<https://devfeed.tech/tags/exploitation.md>), [python](<https://devfeed.tech/tags/python.md>), [virtual-machine](<https://devfeed.tech/tags/virtual-machine.md>), [x86](<https://devfeed.tech/tags/x86.md>)

## AI overview

A technical deep dive into a known bug in Python 2.7.5's virtual machine. The article explains how the bug can be used to control the virtual processor, instrument the VM, and execute native x86 code, with a focus on Windows.

## Source excerpt

Introduction A year ago, I've written a Python script to leverage a bug in Python's virtual machine: the idea was to fully control the Python virtual processor and after that to instrument the VM to execute native codes. The python27_abuse_vm_to_execute_x86_code.py script wasn't really self-explanatory, so I believe only a ...