Last active
August 29, 2015 14:07
-
-
Save rchowe/196e3a81ced7110456ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # | |
| # Run the program, then type this in when it asks for your name: | |
| # | |
| # os.system('say hello') | |
| # | |
| import os | |
| name = eval(input('Enter your name: ')) | |
| print('Hello, {}'.format(name)) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can also be done without the
import osline in the source if the malicious code is written as:The reason this can do anything is that command sent to
os.systemare passed directly to the shell, which can read (cat), create (touch), and remove (rm) anything on the computer that you have access to.