Programming Homework Help

MCDF Reverse Engineering and System Vulnerabilities Problem

 

Part I

Scenario: Novice hackers are trying to write Python code with a malicious code segment injected to attack.

Step 1: Write a simple Python code. For example, a code is shown on slide 6.

Step 2: Contribute to add malicious code. The code should be setting up your local host web server. A sample code is on slides 17-18.

Step 3: Compile a Python to be executable
$python -m py_compile <python file>

Step 4: Assume that your .pyc file is distributed, meaning that it infects others. Run the file and see if index.html is generated.

Step 5: Run the byproduct file index.html

Step 6: Uncompile an executable to Python source code as explained on slide 11.
$uncompyle6 <executable file>